Query selection

S

Striker

I have a table similar to the customer servie database teplate available for
download from MS site. There is a status field that has the lookup set to
Combo Box / Value List and then the row source has a list of values.

Is it possible to force that list of values in a query? Or do I need to
depend on the user to type them in the query correctly by adding the square
brackets? [Enter a Vaue].
 
V

vbasean

is your query run from a form?

if so, your query just needs to have the form field (combo box) value as a
parameter in the query.

Do you have a button that opens the query? Did you use the wizard for
creating it? if so, then the above will work.

here's a link on how to create a parameter query based off a form:
http://www.fontstuff.com/access/acctut08.htm
pay particular attention to the 'Query' part
 
S

Striker

Not really, but the form is populated from the query results.

vbasean said:
is your query run from a form?

if so, your query just needs to have the form field (combo box) value as a
parameter in the query.

Do you have a button that opens the query? Did you use the wizard for
creating it? if so, then the above will work.

here's a link on how to create a parameter query based off a form:
http://www.fontstuff.com/access/acctut08.htm
pay particular attention to the 'Query' part
--
~Your Friend Chris
http://myvbastuff.blogspot.com/
thinking out loud


Striker said:
I have a table similar to the customer servie database teplate available
for
download from MS site. There is a status field that has the lookup set
to
Combo Box / Value List and then the row source has a list of values.

Is it possible to force that list of values in a query? Or do I need to
depend on the user to type them in the query correctly by adding the
square
brackets? [Enter a Vaue].
 
J

John W. Vinson

I have a table similar to the customer servie database teplate available for
download from MS site. There is a status field that has the lookup set to
Combo Box / Value List and then the row source has a list of values.

Is it possible to force that list of values in a query? Or do I need to
depend on the user to type them in the query correctly by adding the square
brackets? [Enter a Vaue].

If the combo box is on a Form (as it should be, you should certainly not be
editing in table datasheets) you can use

=[Forms]![NameOfForm]![NameOfCombo]

as a criterion. The brackets are essential, use your own form and control
names of course.
 

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