Trying to set up a combo box on a form and not sure if I can do what I want.
I have a table [Work] that has two columns [Day of the Week] and [Sales]
I have a query [Workaggregate] that aggregates the data in the [Sales] column for either "Monday", "Tuesday" or a combination of "Monday and Tuesday". I can hard code this into the criteria section to return the result I want. In the case of "Monday and Tuesday" I used an {OR} clause.
I've created a Combo box on a form that present the user with the same three options. For the query, I have pointed the criteria section to the combo box on the form. When the user selects either "Monday" or "Tuesday" from the combo box the query displays the correct information since it matches exactly the records in the table [Day of the Week] column
My issues is with trying to get the query to display the results if the "Monday and Tuesday" option is selected. Is there a way to take a combo box action and turn it into either an {AND} or an {OR} statement?
I tried using a two column combo box, with the second column set to a width of 0". The first column I set to display "Monday and Tuesday" and the second column to "Monday" OR "Tuesday" but it didn't like all the quote marks. My thoughts was that I could then reference the second column in the query.
Thoughts?
Nate
I have a table [Work] that has two columns [Day of the Week] and [Sales]
I have a query [Workaggregate] that aggregates the data in the [Sales] column for either "Monday", "Tuesday" or a combination of "Monday and Tuesday". I can hard code this into the criteria section to return the result I want. In the case of "Monday and Tuesday" I used an {OR} clause.
I've created a Combo box on a form that present the user with the same three options. For the query, I have pointed the criteria section to the combo box on the form. When the user selects either "Monday" or "Tuesday" from the combo box the query displays the correct information since it matches exactly the records in the table [Day of the Week] column
My issues is with trying to get the query to display the results if the "Monday and Tuesday" option is selected. Is there a way to take a combo box action and turn it into either an {AND} or an {OR} statement?
I tried using a two column combo box, with the second column set to a width of 0". The first column I set to display "Monday and Tuesday" and the second column to "Monday" OR "Tuesday" but it didn't like all the quote marks. My thoughts was that I could then reference the second column in the query.
Thoughts?
Nate