Listbox from dynamic SQL Query???

J-F

Registered User.
Local time
Today, 05:44
Joined
Nov 14, 2001
Messages
41
How can I populate a list box using an sql query using variables from 'option group' controls?
 
You populate the RecordSource Property with the SQL String.

This should refresh the List Box.
 
Many thanks.
 
Awise from the gwave!

I'm sure it's simple enough and I'm just [still] being dense, but right now I'm trying

Code:
strSQL ="SELECT somegubbins FROM sometable WHERE somecriteria ishappening"
me.lstListboxname.rowsource = strSQL
me.lstlistboxname.requery
Not chucking up any errors, not putting the SQL inthe rowsource or showing me any results either.

I knew there was a reason I tried to do as little as possible with forms :)

Any suggestions or pointers as to what I'm doing wrong appreciated.

[edit] I hate Access' fixation with brackets, the problem was in the query after all that, my bad.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom