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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|