query in a form

  • Thread starter Thread starter nico
  • Start date Start date
N

nico

Dear all,

I'm trying to use a query that as a reference in the form
itself.

I explain with an example: I have one table with names,
each name corresponds to one category (Man and Woman).

I want to use a combobox in the entry form that will
propose only the man name if man is chosen for the
category.

This is a simple example but I want to use this for a
much more complex database.

I tried to put the value of the category field as a
criteria in the query but it doesn't work.

Anybody got an idea? Thanks for helping!

Nico.
 
Assuming that Male or Female is chosen in a textbox named txtGender, on a
form called frmDialog, the query might look something like:

Select * From tblMyTable Where Gender = [Forms]![frmDialog]![txtGender]
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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

Back
Top