Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code in the field does not return all of the data I need 1

Status
Not open for further replies.

smuthcrmnl777

Technical User
Jan 16, 2006
104
US
Code:
Left([sid1],InStr([sid1],'/')-1)

If I place this in a query as the field, this command only looks for data that has the '/'. I need to grab this and all of the rest of the data.

Currently, the results are
11-100 from 11-100/F

I need this and the other result.
11-100 from 11-100/F
11-100 from 11-100

How can I get this? Is there a simple IIF statement I could plug into the field command?
 


Hi,
[tt]
iif(InStr([sid1],'/')>0,Left([sid1],InStr([sid1],'/')-1),[sid1])
[/tt]


Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top