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
|
|||
|
|||
Multiple Parameters
Hello,
I set up a database to keep track of athletes for a soccer camp and I am trying to run a query in which I am prompted to choose male or female or both, and than also day camp or high school camp or both. Each of these fields is a yes/no field. I can get one parameter to work but not the other one when I run it. Any advise on how to make this work? |
#2
|
|||
|
|||
Multiple Parameters
Is this query the record source of a form or report? What is the actual
table structure? Do you have separate columns for Male, Female, and Both? IMHO, parameter prompts are never advisable in applications. -- Duane Hookom Microsoft Access MVP "ampickel" wrote: Hello, I set up a database to keep track of athletes for a soccer camp and I am trying to run a query in which I am prompted to choose male or female or both, and than also day camp or high school camp or both. Each of these fields is a yes/no field. I can get one parameter to work but not the other one when I run it. Any advise on how to make this work? |
#3
|
|||
|
|||
Multiple Parameters
Yes the query is going to be the source for a report. 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 the 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. 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. "Duane Hookom" wrote: Is this query the record source of a form or report? What is the actual table structure? Do you have separate columns for Male, Female, and Both? IMHO, parameter prompts are never advisable in applications. -- Duane Hookom Microsoft Access MVP "ampickel" wrote: Hello, I set up a database to keep track of athletes for a soccer camp and I am trying to run a query in which I am prompted to choose male or female or both, and than also day camp or high school camp or both. Each of these fields is a yes/no field. I can get one parameter to work but not the other one when I run it. Any advise on how to make this work? |
#4
|
|||
|
|||
Multiple Parameters
I think it's a mistake to have two fields for gender. You should have one
[Gender] field with values like "M" or "F". The same is true for camper type. You then provide the user with a form that allows selection of various criteria. Use code to create a Where Condition to be used in the DoCmd.OpenReport method. -- Duane Hookom Microsoft Access MVP "ampickel" wrote: Yes the query is going to be the source for a report. 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 the 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. 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. "Duane Hookom" wrote: Is this query the record source of a form or report? What is the actual table structure? Do you have separate columns for Male, Female, and Both? IMHO, parameter prompts are never advisable in applications. -- Duane Hookom Microsoft Access MVP "ampickel" wrote: Hello, I set up a database to keep track of athletes for a soccer camp and I am trying to run a query in which I am prompted to choose male or female or both, and than also day camp or high school camp or both. Each of these fields is a yes/no field. I can get one parameter to work but not the other one when I run it. Any advise on how to make this work? |
Thread Tools | |
Display Modes | |
|
|