InStr???

Tommy B

Registered User.
Local time
Today, 09:39
Joined
Feb 26, 2001
Messages
43
Am trying to use above function to return a list of CallID numbers but when I enter the following in my select query it keeps putting the expr: in front of it? How do I add this as a selection criteria?

InStr([CallID seperated by commas,Blank=All],[CallID])

Help me please!!!
 
The 'Expr:' part is what the query design window calls a field if you don't rename it. You can put InStr Value: InStr(... for example and see the difference.

InStr returns the position value of the text in question. not the actual text itself. Go into a VBA window and type InStr into the help search window (the one you get by searching from regular Access is less than unhelpful).

A followup questiuon though: Why are your CallID numbers stored in a series of commas in your table? If this is a comma delimited file you're importing, are you breaking the fields down properly?

Post back here if you have more problems.

HTH,
David R
 
Hi David,

Many thanks for the reply mate. Help file cleared it up for me. What I wanted to (and now have) achieved was the ability for the user to select a number of CallID's to view on a report something like :

1,5,6,8,12

Buy adding >0 or is null into the criteria box it will return all fields if left blank.

Is there a better way of doing this?

Thanks again
smile.gif


Tom.
 
Your system does work, so I would only try other things in a test db for right now. One option that comes to mind, though I've never used it myself, is an unbound multi-select list box. Put all the reports in the list, and your client can click to highlight the reports they want, then select a View Reports button or something similar. The list box captures the value of all the highlighted reports but cannot store them in your table, for obvious reasons.

HTH,
David R
 

Users who are viewing this thread

Back
Top Bottom