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  

More than one parameter



 
 
Thread Tools Display Modes
  #1  
Old July 12th, 2008, 06:52 PM posted to microsoft.public.access.queries
ampickel
external usenet poster
 
Posts: 6
Default More than one parameter

I set up a database to keep track of athletes enrolled in a soccer camp. The
table is
structured with first and last names, address, basically all information
reguarding the athlete. I have two colums, one for male and one for female,
both are yes/no fields, (check boxes), and two columns, one for day camp and
one for high school camp. What I want to do is run a query so that I can
pull records in any combination, for example all male day campers, or all
female high school campers or all high school campers male and female. I
can do one parameter just fine and I know the null option to get both, but
when I add
the other parameter my queries come up blank. Any ideas!


  #2  
Old July 12th, 2008, 07:41 PM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 744
Default More than one parameter

On Jul 12, 12:52*pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer camp. The
table is
structured with first and last names, address, basically all information
reguarding the athlete. *I have two colums, one for male and one for female,
both are yes/no fields, (check boxes), and two columns, one for day camp and
one for high school camp. *What I want to do is run a query so that I can
pull records in any combination, for example all male day campers, or all
female high school campers or all high school campers male and female. *I
can do one parameter just fine and I know the null option to get both, but
when I add
the other parameter my queries come up blank. *Any ideas!


Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.
  #3  
Old July 12th, 2008, 08:12 PM posted to microsoft.public.access.queries
ampickel
external usenet poster
 
Posts: 6
Default More than one parameter

Ok, I went in and set up one column and changed all the records. But when I
run the query as null for one of the parameters it still comes up blank.
Example. prompt comes up male or female. I choose null and leave it blank,
then next prompt is Day camp or High school camp, I pick Day camp and it is
blank. The only time I get records to pop up is when I choose Male or Female,
and Day camp or High school camp. I can't do the null. Why?


" wrote:

On Jul 12, 12:52 pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer camp. The
table is
structured with first and last names, address, basically all information
reguarding the athlete. I have two colums, one for male and one for female,
both are yes/no fields, (check boxes), and two columns, one for day camp and
one for high school camp. What I want to do is run a query so that I can
pull records in any combination, for example all male day campers, or all
female high school campers or all high school campers male and female. I
can do one parameter just fine and I know the null option to get both, but
when I add
the other parameter my queries come up blank. Any ideas!


Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.

  #4  
Old July 12th, 2008, 08:30 PM posted to microsoft.public.access.queries
Pete D.[_3_]
external usenet poster
 
Posts: 488
Default More than one parameter

If the data isn't null then nothing will come up. Depends on design of
your query so just out of a guess try * instead of male/female for all.
"ampickel" wrote in message
...
Ok, I went in and set up one column and changed all the records. But
when I
run the query as null for one of the parameters it still comes up blank.
Example. prompt comes up male or female. I choose null and leave it
blank,
then next prompt is Day camp or High school camp, I pick Day camp and it
is
blank. The only time I get records to pop up is when I choose Male or
Female,
and Day camp or High school camp. I can't do the null. Why?


" wrote:

On Jul 12, 12:52 pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer
camp. The
table is
structured with first and last names, address, basically all
information
reguarding the athlete. I have two colums, one for male and one for
female,
both are yes/no fields, (check boxes), and two columns, one for day
camp and
one for high school camp. What I want to do is run a query so that I
can
pull records in any combination, for example all male day campers, or
all
female high school campers or all high school campers male and female.
I
can do one parameter just fine and I know the null option to get both,
but
when I add
the other parameter my queries come up blank. Any ideas!


Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.



  #5  
Old July 12th, 2008, 08:43 PM posted to microsoft.public.access.queries
ampickel
external usenet poster
 
Posts: 6
Default More than one parameter

My understanding of the Null value is this. In the design view under
Criteria I put [Male or Female] to be prompted. Then in the or box below it
I put [Male or Female] Is Null, if I want it to return all records. Is that
correct? Then when the query runs I just leave the prompt box blank and all
records will show. But when I do that for one parameter it like, ignores the
other parameter. Example if I want both male and female Day campers. I put
in the propmpt boxes, nothing for the first and Day camp for the second and I
get no records returned. Is there a way to run both?

"Pete D." wrote:

If the data isn't null then nothing will come up. Depends on design of
your query so just out of a guess try * instead of male/female for all.
"ampickel" wrote in message
...
Ok, I went in and set up one column and changed all the records. But
when I
run the query as null for one of the parameters it still comes up blank.
Example. prompt comes up male or female. I choose null and leave it
blank,
then next prompt is Day camp or High school camp, I pick Day camp and it
is
blank. The only time I get records to pop up is when I choose Male or
Female,
and Day camp or High school camp. I can't do the null. Why?


" wrote:

On Jul 12, 12:52 pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer
camp. The
table is
structured with first and last names, address, basically all
information
reguarding the athlete. I have two colums, one for male and one for
female,
both are yes/no fields, (check boxes), and two columns, one for day
camp and
one for high school camp. What I want to do is run a query so that I
can
pull records in any combination, for example all male day campers, or
all
female high school campers or all high school campers male and female.
I
can do one parameter just fine and I know the null option to get both,
but
when I add
the other parameter my queries come up blank. Any ideas!

Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.




  #6  
Old July 12th, 2008, 08:46 PM posted to microsoft.public.access.queries
Bob Barrows [MVP]
external usenet poster
 
Posts: 441
Default More than one parameter

Because the query will only return results where the field value equals the
parameter value. Nothing equal Null, so nothing gets returned.

What you need to do is something like this (switch your query to SQL View to
see the sql statement):

WHERE ... ([Gender] = [Male or Female] Or [Male or Female] is Null) ...

ampickel wrote:
Ok, I went in and set up one column and changed all the records.
But when I run the query as null for one of the parameters it still
comes up blank. Example. prompt comes up male or female. I choose
null and leave it blank, then next prompt is Day camp or High school
camp, I pick Day camp and it is blank. The only time I get records to
pop up is when I choose Male or Female, and Day camp or High school
camp. I can't do the null. Why?


" wrote:

On Jul 12, 12:52 pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer
camp. The table is
structured with first and last names, address, basically all
information reguarding the athlete. I have two colums, one for
male and one for female, both are yes/no fields, (check boxes), and
two columns, one for day camp and one for high school camp. What I
want to do is run a query so that I can pull records in any
combination, for example all male day campers, or all female high
school campers or all high school campers male and female. I can
do one parameter just fine and I know the null option to get both,
but when I add
the other parameter my queries come up blank. Any ideas!


Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #7  
Old July 12th, 2008, 08:55 PM posted to microsoft.public.access.queries
Pete D.[_3_]
external usenet poster
 
Posts: 488
Default More than one parameter

Just so you know, Null is the absents of any value so if it is Male or
Female it isn't Null. Only an unchanged blank field would = Null
"ampickel" wrote in message
...
My understanding of the Null value is this. In the design view under
Criteria I put [Male or Female] to be prompted. Then in the or box below
it
I put [Male or Female] Is Null, if I want it to return all records. Is
that
correct? Then when the query runs I just leave the prompt box blank and
all
records will show. But when I do that for one parameter it like, ignores
the
other parameter. Example if I want both male and female Day campers. I
put
in the propmpt boxes, nothing for the first and Day camp for the second
and I
get no records returned. Is there a way to run both?

"Pete D." wrote:

If the data isn't null then nothing will come up. Depends on design of
your query so just out of a guess try * instead of male/female for all.
"ampickel" wrote in message
...
Ok, I went in and set up one column and changed all the records. But
when I
run the query as null for one of the parameters it still comes up
blank.
Example. prompt comes up male or female. I choose null and leave it
blank,
then next prompt is Day camp or High school camp, I pick Day camp and
it
is
blank. The only time I get records to pop up is when I choose Male or
Female,
and Day camp or High school camp. I can't do the null. Why?


" wrote:

On Jul 12, 12:52 pm, ampickel
wrote:
I set up a database to keep track of athletes enrolled in a soccer
camp. The
table is
structured with first and last names, address, basically all
information
reguarding the athlete. I have two colums, one for male and one for
female,
both are yes/no fields, (check boxes), and two columns, one for day
camp and
one for high school camp. What I want to do is run a query so that
I
can
pull records in any combination, for example all male day campers,
or
all
female high school campers or all high school campers male and
female.
I
can do one parameter just fine and I know the null option to get
both,
but
when I add
the other parameter my queries come up blank. Any ideas!

Bad design.
You should have ONE column for gender, and if the day/highschool
options are mutually exclusive, those should be a single column too.
That's why querying is such a hassle.






 




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 01:36 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.