A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

*Query Criteria



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2007, 07:56 PM posted to microsoft.public.access.queries
Cheese
external usenet poster
 
Posts: 63
Default *Query Criteria

I have a query with criteria that looks at a field on a table that refers to
a Lookup table. Currently, I have the criteria ask the user to type the text
for the field. I would rather have the user select from the options on the
look-up table to avoid mispellings...how can I accomplish this?
  #2  
Old May 30th, 2007, 09:45 PM posted to microsoft.public.access.queries
Dale Fye
external usenet poster
 
Posts: 2,651
Default *Query Criteria

The best way is to execute the query from a form. Use a combo box to display
the items from your lookup table, then in the criteria line of your query
enter a reference to the control on your form. It will look something like:

Form![YourFormName]![cbo_yourComboName]

The other way to do this is to right-click in the criteria line, Select
Build. Then double click on Forms, double click All Forms, and then click on
the form you are using. As soon as select a specific form, the middle list
will display all of the controls on that form. Double click on the control
that contains your list (you should now see a reference to a control similiar
to the one above in the text box) and then click OK.

HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.


"Cheese" wrote:

I have a query with criteria that looks at a field on a table that refers to
a Lookup table. Currently, I have the criteria ask the user to type the text
for the field. I would rather have the user select from the options on the
look-up table to avoid mispellings...how can I accomplish this?

  #3  
Old May 30th, 2007, 10:59 PM posted to microsoft.public.access.queries
Ofer Cohen
external usenet poster
 
Posts: 1,683
Default *Query Criteria

Sorry it took me a while to come back to you, In the previous post I wrote
that the path to the combo when it located in the sub form is different

Forms![MainFormName]![SubFormControlName].Form![StatusChange]

--
Good Luck
BS"D


"Cheese" wrote:

I have a query with criteria that looks at a field on a table that refers to
a Lookup table. Currently, I have the criteria ask the user to type the text
for the field. I would rather have the user select from the options on the
look-up table to avoid mispellings...how can I accomplish this?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.