Previous Thread

7/6/2006 8:26:02 PM    need number in Criteria not enter number
I have a Database that the Criteria has [enter districts] or [enter 
 
districts] or [enter districts].  So every time I type in three numbers I 
 
want. “I have 18 centers and in every center has 3 districts. I have to do 
 
this 18 times.”  I would like to make a Marco, but I do not know how to make 
 
the Criteria, so I do not have to type the three districts in, (example 24, 
 
39, and 41) in one query then move to another query and give me 4, 5 and 20 
 
and etc.  Can you tell me in the Criteria part how to put just the number 
 
type in this Criterion? I tried =24 “on one line” then =39 the next, and the 
 
three line =41 but does not work. 
 
-- 
 
rickburns



7/6/2006 9:43:05 PM    Re: need number in Criteria not enter number
On Thu, 6 Jul 2006 20:26:02 -0700, 
 
rickanddianeburns@buckeye-express.com 
 
<rickanddianeburnsbuckeyeexpresscom@discussions.microsoft.com> wrote: 
 
If you use the same parameter multiple times, you'll only get prompted 
 
once. Try using three DIFFERENT prompts - [Enter first district], 
 
[Enter second district], [Enter third district] on three separate 
 
lines of the query grid for example. 
 
Or... better... create a little unbound Form, named frmCrit say, with 
 
three textboxes txtDist1, txtDist2, txtDist3. Use criteria 
 
=[Forms]![frmCrit]![txtDist1] 
 
=[Forms]![frmCrit]![txtDist2] 
 
=[Forms]![frmCrit]![txtDist3] 
 
on three separate lines of the query grid. 
 
I'm not at all certain how the "centers" get involved. Are you putting 
 
in other criteria for the center? or do the districts depend on the 
 
center? 
 
John W. Vinson[MVP]

7/6/2006 9:44:26 PM    Re: need number in Criteria not enter number
rickburns, 
 
I would put all three districts on one line, kind of like your parameter criteria: 
 
Replace "[enter districts] or [enter districts] or [enter districts]" with "24 Or 39 Or 41" 
 
This is pretty much saying the same thing as you have written below, ONLY if you have no other criteria for other fields. 
 
If you do have criteria for other fields on the first criteria line and the 3 districts on 3 different lines, then what you are 
 
telling Access to query is: 
 
(district = 24 AND all other criteria) OR (district = 39) OR (district = 41) 
 
when what you want to tell access to query is: 
 
((district = 24 OR district = 39 OR district = 41) AND all other criteria) 
 
Another way to simplfy the query would be to add a "Center" field to the table. 
 
Then for all records with districts of 24, 39, or 
 
41, the "Center" field could be set to 1...all records with districts of 4, 5, or 20 could have the "Center" field set to 2...and so 
 
on and so forth.  Then your queries could be set to return "Center 1" instead of "Districts 24, 39, and 41". 
 
I hope this helps, 
 
Conan Kelly 
 
"rickanddianeburns@buckeye-express.com" <rickanddianeburnsbuckeyeexpresscom@discussions.microsoft.com> wrote in message 
 
news:12AE2332-965F-4BC0-9A38-1767715D9069@microsoft.com...