Listbox on a form as input for a query

G

Guest

Hello All

I have an unbound multi-select listbox on a form. I am getting values from a column into the listbox. I want the values selected to be input for a query. So, in the query, under the column, i have forms![nameofform]![nameoflistbox]. i also have a macro to run the query when the selections are made on the list box. when i run the form, i get "The microsoft jet database engine does not recognize 'forms![nameofform]![nameoflistbox]' as a valid field name or extension

Any help would be greatly appreciated

Thanks

Malli
 
V

Van T. Dinh

You cannot use Multi-Select ListBox the way you described.

See The Access Web article:

http://www.mvps.org/access/forms/frm0007.htm

--
HTH
Van T. Dinh
MVP (Access)



Malli said:
Hello All,

I have an unbound multi-select listbox on a form. I am getting values from
a column into the listbox. I want the values selected to be input for a
query. So, in the query, under the column, i have
forms![nameofform]![nameoflistbox]. i also have a macro to run the query
when the selections are made on the list box. when i run the form, i get
"The microsoft jet database engine does not recognize
'forms![nameofform]![nameoflistbox]' as a valid field name or extension.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top