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

Listbox column selected to be used as query filter

Status
Not open for further replies.

eavan

Technical User
Aug 6, 2003
51
GB
Guys,

I have a listbox on a form which the users make a selection.Depending on what selection they make, a command button they press will "should anyway" use the first column as a filter in a macro opening up a form.I have tried just adding some variations of = [formName].[listboxName].[Column0].value in the Where Condition in the macro. None of my efforts are working. I prob not far off it but also could be a mile. Couldn't find much on the net about it. Would anyone have a clue. Would much appreciate it. Cheers
 
you may try this syntax:
[Forms]![formName]![listboxName]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thanks for the prompt response.
I tried =[Forms]![formName]![listboxName].Column(0)
and a few iterations of this...
it doesn't look correct..what do you think?
 
I think I didn't mentioned to use the Column property ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
hey..if i don't use the column part how will i pick up the selected list box item's column? I need to use it as the filter for the next form. CHeers
 
how will i pick up the selected list box item
Set the BoundColumn property to 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
[Forms]![Assigned test list]![List0] is what i have now in the Where Condition for OpenForm macro...and i have the boundColumn set to 1 but it doesn't appear to be filtering.Cheers
 
[Name of field] = [Forms]![Assigned test list]![List0]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
happy days..much appreciated..ill make the same excuse as most inept people like myself make..i don't use access ever..cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top