User prompt query

texasalynn

Registered User.
Local time
Today, 12:51
Joined
May 30, 2002
Messages
47
I have a query that has a dialog box that opens for the user to enter the data criteria. It is not fancy or complicated just:
[Enter CMS number]

However now I need to be able if they want multiple choices. For example they want more than one number they would enter
850 or 820 in the dialog box. This doesn't work the way I have it now. How do I allow for this? I'm looking for something similiar to how the critieria line is filled in. e.g. "850" or "820". They might enter one number or maybe six. It is never consistent to how many. I hope I explained this clearly.

Thanks .... texasalynn
 
There is a sample DB in this thread.
http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=48937


Note:
If the field to search is a numeric field, the 4 single quotes (as only a text field requires the single quotes) in these two lines of code need to be removed:-

sCriteria = sCriteria & ",'" & Trim(Left(sAccNos, InStr(sAccNos, ",") - 1)) & "'"

sCriteria = sCriteria & ",'" & sAccNos & "'"


That is:-

sCriteria = sCriteria & "," & Trim(Left(sAccNos, InStr(sAccNos, ",") - 1))

sCriteria = sCriteria & "," & sAccNos
 

Users who are viewing this thread

Back
Top Bottom