Criteria Script for a Query

G

Guest

What I am trying to accomplish is feed a value to a query from a drop down
combo box from a form I have created for the purpose. I have a table called
Departments; this table contains 47 departments. I created a drop down combo
box on a form I call EnterParaValuesForm. The combo box works fine;the combo
box is named Department. A friend gave me the following script to put in as
criteria for the query:

[Forms]![EnterParaValuesForm]![Department]

When the query executes it is supposed to call my form with the drop down
combo box allow me to make a department selection from the combo box and then
execute by feeding the query the department selected.

When I execute the query I get the standard query criteria dialogue box with
the values Form!EnterParaValuesForm!Department entered as the criteria line
in the dialogue. I do not get my form with the drop down combo box.

I have checked my spelling a dozen times – what am I doing wrong. Thanks in
advance for the assistance.
 
K

Ken Snell \(MVP\)

A query will not call / open a form. What you do is open the form, enter
your value, and then run the query (while the form remains open) so that it
can read the value from the form.

This all can be programmed if needed.
 

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