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  

Variable in Criteria



 
 
Thread Tools Display Modes
  #1  
Old September 3rd, 2008, 08:49 PM posted to microsoft.public.access.queries
Jack
external usenet poster
 
Posts: 463
Default Variable in Criteria

Hello,

I have a query setup with date and 7 locations, so there are 8
columns(fields). In the 7 locations(fields)there can be only one person
listed. They can be listed in any one of the 7 locations. I know how to setup
the Criteria for "Or" in the rows. What I need to know is there a way to use
a Variable in a drop down box or Just a Paramater Box where you can enter
just the name once and it will work across the 7 locations?

I hope I explained this correctly.

TIA

Jack

  #2  
Old September 3rd, 2008, 09:22 PM posted to microsoft.public.access.queries
Lord Kelvan
external usenet poster
 
Posts: 637
Default Variable in Criteria

to be honest your table structure sounds bad you should have a
different table structure then you could run a cross tab query or
something

something like

location table
locationid
locationdescription

person table
personid
personname

locationpersonlink table
locationid
personid
locationpersonlinkdate


if you want a paramater to work accross different columns then you
have to enter it accross different columns you cannot use a drop down
list unless you build a form to do it for you

Regards
Kelvan
  #3  
Old September 3rd, 2008, 11:49 PM posted to microsoft.public.access.queries
NetworkTrade
external usenet poster
 
Posts: 825
Default Variable in Criteria

sure. if the name is entered in Form1 NameTextBox

then in the criteria of your query, in all 7 fields - but the same criteria:
Forms!Form1.NameTextBox

put them all on the same line in each of the 7 fields and it should work
fine....
--
NTC


"Jack" wrote:

Hello,

I have a query setup with date and 7 locations, so there are 8
columns(fields). In the 7 locations(fields)there can be only one person
listed. They can be listed in any one of the 7 locations. I know how to setup
the Criteria for "Or" in the rows. What I need to know is there a way to use
a Variable in a drop down box or Just a Paramater Box where you can enter
just the name once and it will work across the 7 locations?

I hope I explained this correctly.

TIA

Jack

 




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 03:14 AM.


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