What criterion would I use to ask a user to select a value from a

S

sk

Hi all. First, thank you in advance for assisting me. I really appreciate
what these forums do for users like myself.

My question:
I'm trying to create a query, that when activated, asks a user to select a
value from a list. What criterion would I use to prompt such a dialog box?

In details:
I've got a query designed pulling from 2 tables, which the tables have a
relation to a master table. The master Table name is "Setlist Generator".
In that table is the field "Venue". That field is set as a "lookup wizard"
that pulls from a relational table containing the list of different venues.
All relations work well and as a whole everything does as it should.

I want a criterion that, when the query is activated, prompts the user with
a list box asking the user to select a value from that list box. The query
would then return the matching records with that one selected value.

I do not want the user to type in a value; only to select an existing.
Please help; how do I set that up?

Again, thank you very much for your help.

sk
 
J

John W. Vinson

Hi all. First, thank you in advance for assisting me. I really appreciate
what these forums do for users like myself.

My question:
I'm trying to create a query, that when activated, asks a user to select a
value from a list. What criterion would I use to prompt such a dialog box?

In details:
I've got a query designed pulling from 2 tables, which the tables have a
relation to a master table. The master Table name is "Setlist Generator".
In that table is the field "Venue". That field is set as a "lookup wizard"
that pulls from a relational table containing the list of different venues.
All relations work well and as a whole everything does as it should.

I want a criterion that, when the query is activated, prompts the user with
a list box asking the user to select a value from that list box. The query
would then return the matching records with that one selected value.

I do not want the user to type in a value; only to select an existing.
Please help; how do I set that up?

Create a little unbound form name, let's say, frmCrit. Put a listbox or Combo
Box named cboVenue on the form bound to the Venue table.

Base a query on the Setlist Generator table; use a criterion on Venue of

=[Forms]![frmCrit]![cboVenue]

Put a command button on frmCrit to open your desired report or form (based on
the query); it's rarely or never necessary to display a query datasheet.

Also note that Lookup Fields are often considered a misfeature: see
http://www.mvps.org/access/lookupfields.htm
 
S

sk

Thank you VERY much John. VERY helpful -- thank you!

sk

John W. Vinson said:
Hi all. First, thank you in advance for assisting me. I really appreciate
what these forums do for users like myself.

My question:
I'm trying to create a query, that when activated, asks a user to select a
value from a list. What criterion would I use to prompt such a dialog box?

In details:
I've got a query designed pulling from 2 tables, which the tables have a
relation to a master table. The master Table name is "Setlist Generator".
In that table is the field "Venue". That field is set as a "lookup wizard"
that pulls from a relational table containing the list of different venues.
All relations work well and as a whole everything does as it should.

I want a criterion that, when the query is activated, prompts the user with
a list box asking the user to select a value from that list box. The query
would then return the matching records with that one selected value.

I do not want the user to type in a value; only to select an existing.
Please help; how do I set that up?

Create a little unbound form name, let's say, frmCrit. Put a listbox or Combo
Box named cboVenue on the form bound to the Venue table.

Base a query on the Setlist Generator table; use a criterion on Venue of

=[Forms]![frmCrit]![cboVenue]

Put a command button on frmCrit to open your desired report or form (based on
the query); it's rarely or never necessary to display a query datasheet.

Also note that Lookup Fields are often considered a misfeature: see
http://www.mvps.org/access/lookupfields.htm
 

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