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

Multi Select List Box

Status
Not open for further replies.

jgirardi

IS-IT--Management
Nov 15, 2001
8
US
Hi
I have been trying to have a Multi select list box provide the criteria for a Query.

After reading all of the threads I was able to create code that would store the selections in a Query format.

The Variable name is Text1 and is entered in the code for Private Sub Preview_Click()
Using debug i see the criteria format is good, however i am unable to get this to the Query.
[Forms]![formname]![Text1]
I thought perhaps that by making Text1 a public variable it would then be able to be used in the Query. That did not work.

This is my first time asking for help here so I know this is very unclear and I am a Access newbie. I hope someone can help.

Thanks
 
Hi!

What you have should work if Text1 is a text box on your form. So, instead of using a declared variable, put a text box on your form called Text1 and see what happens.

hth Jeff Bridgham
bridgham@purdue.edu
 
Thank you..

I never thought of that.. I do now see the selected text in that box.. I must have something else messed up at this point but things are looking Much better.
 
I have been trying to use the Text1 Textbox as the selection criterior, however it somehow is not being used by the query.

I tried Cutting and pasting the info from the text box and placing it in the criterior of the query itself and that does work telling me the text is ok.

There seems to be a problem trying to use the Text Box info in the query.. Anyone have an idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top