Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / October 2007

Tip: Looking for answers? Try searching our database.

Alpha and Numeric in one field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lori - 30 Oct 2007 21:31 GMT
Okay, I have one field that contains either an assigned project # or text
indicating Prorate. I need to separate out the prorated items which isn't the
problem.

I've used CO:Left(DAC Name],1) to pull the first character of the field.
This character will be either a 3, 4 or the letter P.

The P items are the prorated ones that I need to work with separately,
however, the 3 and 4 items are still needed.

My problem is that in order for my final output to look the way I need I
have to create an expression that says IIF([CO]= 3 Or 4,100,0) and then work
with those items with the 0 entry to prorate the values. My problem is that
if I look for the numbers, I get #Error for all of the "P" items since there
are not numeric. If I change the expression to read IIF([CO] ="P",0,100) it
reads all items as alpha and gives me the 100 regardless of the value of the
CO Field.

I know the issue is the combination of the alpha and numerica in the same
field but this is not something I can change. The Field is designated as text
in the table (it was imported from an excel spreadsheet and that is added to
every month).

I know there has to be a way around it, I'd appreciate any help I can get.
Signature

Lori A. Pong

Ofer Cohen - 30 Oct 2007 21:42 GMT
Instead of using the CO (which insome cases the query might not recognise it)
write the fomula

IIf(Left([DAC Name],1) In ("3","4"),100,0)

Signature

Good Luck
BS"D

> Okay, I have one field that contains either an assigned project # or text
> indicating Prorate. I need to separate out the prorated items which isn't the
[quoted text clipped - 20 lines]
>
> I know there has to be a way around it, I'd appreciate any help I can get.
Lori - 31 Oct 2007 13:33 GMT
Works Perfectly, THANKS!
Signature

Lori A. Pong

> Instead of using the CO (which insome cases the query might not recognise it)
> write the fomula
[quoted text clipped - 25 lines]
> >
> > I know there has to be a way around it, I'd appreciate any help I can get.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.