Passing query parameters using a form

  • Thread starter Thread starter Simon Cleal
  • Start date Start date
S

Simon Cleal

I have a Make Table query with a user input parameter
[type], and I want the user to pick from a list box(called
lstType) and pass that selection to the query.

What code do I need with my command button click event to
do that?

Thanks in advance

Simon
 
Simon

Actually, none! The way you "use" the form's listbox's value in your query
is to open the query in design mode and use an expression in the criterion
for that field that points back to the form. NOTE: the form will have to
be open for this to work.

The expression looks something like (actual syntax may vary -- check Access
HELP):

Forms![YourFormName]![lstType]

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top