I have a query that queries the work order table by date. I want to be able to query by last 30, 60, or 90 days.
I'm using a combo box on my main form to select 30, 60 or 90 days. The bound column for the combo box should return
or
depending on which one is selected.
I have the following code for the after update event for the combo box:
When I open the form I get the following error:
"the expression is typed incorrectly or it is too complex to be evaluated..."
If I type the criteria directly into the query it works fine.
I tried eliminating the combo box as a part of the problem by closing the form and entering the criteria at runtime. However, I get the same error.
Access seems to have a problem receiving criteria in the form of an expression from a comba box.
Is this possible and I'm just missing something?
Thanks in advance.
I'm using a combo box on my main form to select 30, 60 or 90 days. The bound column for the combo box should return
Code:
>= Date()-30
Code:
>= Date()-60
Code:
>= Date()-90
I have the following code for the after update event for the combo box:
Code:
Forms![frm_Main].[sfrm_WO_Query_Results].Form.Requery
"the expression is typed incorrectly or it is too complex to be evaluated..."
If I type the criteria directly into the query it works fine.
I tried eliminating the combo box as a part of the problem by closing the form and entering the criteria at runtime. However, I get the same error.
Access seems to have a problem receiving criteria in the form of an expression from a comba box.
Is this possible and I'm just missing something?
Thanks in advance.
Comment