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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable for query criteria - using more than one 1

Status
Not open for further replies.

fredk

Technical User
Jul 26, 2001
708
US
I am trying to set the criteria of the query using code - I am ok until I have to use more than one result - For example, if I want the criteria to be only one name I am ok - However, if I want an "all" field I am running into problems - For example:

This code works all but the Case All - Because the criteria is not correct when entered in the query - How do I correct this so the query reads it as "Dascit" or "TRA" etc ?????

Thank you very much!!!!

Select Case lngOptionGroupValue
Case Dascit:
strTest = "Dascit"
Case TRABenefits:
strTest = "TRA"
Case MidMonmouth:
strTest = "Mid"
Case FotekWalsh:
strTest = "Fot"
Case DirectSouth:
strTest = "Direct"
Case All:
strTest= "Dasict or TRA or Mid or Fot or Direct "
End Select
 
fredk, CVigil,

Sorry to trouble you but this is the first place on the internet where (after browsing many sites[morning]) I see this topic being discussed ...

I actually have a similar question for which I cannot find an answer but would be very grateful if you could give me a hint on how to proceed or where to search. How can I set the Value of a TextBox to be the QueryOption for a Mailmerge in Word? The idea would be for people to fill in their number in a form in a word-doc and this would result in merging the relevant data ... I know it's an Access forum here but would not be bothering you if I easily found an answer ... I'm not an expert like you but would appreciate it a lot if you would have a sec to reply ... [2thumbsup]

Many thanks in advance ! ! !
krautz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top