G
Guest
I originally posted this in the Forms forum. But since it also involves vba
code, I am reposting here for widest visibility.
---------------------------------------------------------------------------------------------
I have a form with several text boxes/combo boxes into which data is entered
or from which options are selected.
I have a query that selects data from a table with selection criteria based
on the data entered in the text boxes or options selected from the combo
boxes.
After filing in the text boxes and/or selecting the options in the combo
boxes, if I just go to the database window and double-click the query, it
runs perfectly. The data returned is exactly as I am expecting it to be to
include correct summed amounts.
However, if I click the "Run Query" button I have on the form, executing vba
code which determines which query to process, I get an error. I place a
breakpoint on the first line of code -- Public Sub cmdRunQuery_Click() -- and
go over to the database window and double-click the query, it returns an
error (whether I breakpoint it or let the code run, the same error is
returned).
Error statement: "This expression is typed incorrectly, or it is too complex
to be evaluated ..."
The query will run if there is no active vba running, but will return an
error if there is vba code active ... ?
Absolutely confounding! Has anyone heard of this? Any recommended solutions?
code, I am reposting here for widest visibility.
---------------------------------------------------------------------------------------------
I have a form with several text boxes/combo boxes into which data is entered
or from which options are selected.
I have a query that selects data from a table with selection criteria based
on the data entered in the text boxes or options selected from the combo
boxes.
After filing in the text boxes and/or selecting the options in the combo
boxes, if I just go to the database window and double-click the query, it
runs perfectly. The data returned is exactly as I am expecting it to be to
include correct summed amounts.
However, if I click the "Run Query" button I have on the form, executing vba
code which determines which query to process, I get an error. I place a
breakpoint on the first line of code -- Public Sub cmdRunQuery_Click() -- and
go over to the database window and double-click the query, it returns an
error (whether I breakpoint it or let the code run, the same error is
returned).
Error statement: "This expression is typed incorrectly, or it is too complex
to be evaluated ..."
The query will run if there is no active vba running, but will return an
error if there is vba code active ... ?
Absolutely confounding! Has anyone heard of this? Any recommended solutions?