P
PVic
I am new to Access. I am using the MS "How To" to assist in creating a form
to supply parameters to a query. Thus far all controls on the form are
working except the 'combo box'. When I attempt to retrieve information by
selecting a value from the 'combo box', the following message is received:
" This expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many complicated
expressions. Try simplifying the expression by assigning parts of the
expression to variables."
My goal is to use this form to supply parameters to a report. As I
indicated, the 'text box' and 'command button' controls work as expected and
supply the correct information. Following is what I've done to set up the
'combo box':
I allowed the Control Wizard to help me create "Computer Model" combo box.
Steps used: in the wizrd,
1. clicked 'I want the combo box to look up the values in a table or query.'
2. chose tblComputerModels
3. in Available Fields, chose "CompMod" (which list the model descriptions)
4. selected "CompMod" for the sort order (not "CompID", the primary key)
5. left the 'Hide Key Column (recommended) check box selected
6. changed the label for the 'combo box' to "WhatCompModel", clicked finish
7. Opened Properties for the 'combo box' and set following values
NAME to WhatCompModel
BOUND COLUMN to 2
8. closed combo box properties
9. saved form as "ComputersByRoom_Form"
Next, I modified the companion query, "ComputersByRoom_Query" by entering
the following text to access the value in the "WhatCompModel" control on the
form as the parameter for the "CompMod" column, in the Criteria field, in the
query :
[Forms]![ComputersByRoom_Form]![WhatCompModel] Or [Forms]!
[ComputersByRoom_Form]![WhatCompModel] Is Null
Then I saved the query.
I ensured that 'ComputersByRoom_Query' (the parameter query) was set as the
RecordSource property for the report.
However, when I open the report, the ComputersByRoom_Form is presented, the
value is selected from the combo box list, and the OK command button is
selected, the aforementioned Message Box error is returned:
"This expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many complicated
elements. Try simplifying the expression by assigning parts of the expression
to variables."
Once again, I am able to supply the parameter values for the remaining
fields (room number, state ID, and serial number) by typing the input into
the form fields and they all work perfectly--but not the combo box.
Any ideas?
PVic
to supply parameters to a query. Thus far all controls on the form are
working except the 'combo box'. When I attempt to retrieve information by
selecting a value from the 'combo box', the following message is received:
" This expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many complicated
expressions. Try simplifying the expression by assigning parts of the
expression to variables."
My goal is to use this form to supply parameters to a report. As I
indicated, the 'text box' and 'command button' controls work as expected and
supply the correct information. Following is what I've done to set up the
'combo box':
I allowed the Control Wizard to help me create "Computer Model" combo box.
Steps used: in the wizrd,
1. clicked 'I want the combo box to look up the values in a table or query.'
2. chose tblComputerModels
3. in Available Fields, chose "CompMod" (which list the model descriptions)
4. selected "CompMod" for the sort order (not "CompID", the primary key)
5. left the 'Hide Key Column (recommended) check box selected
6. changed the label for the 'combo box' to "WhatCompModel", clicked finish
7. Opened Properties for the 'combo box' and set following values
NAME to WhatCompModel
BOUND COLUMN to 2
8. closed combo box properties
9. saved form as "ComputersByRoom_Form"
Next, I modified the companion query, "ComputersByRoom_Query" by entering
the following text to access the value in the "WhatCompModel" control on the
form as the parameter for the "CompMod" column, in the Criteria field, in the
query :
[Forms]![ComputersByRoom_Form]![WhatCompModel] Or [Forms]!
[ComputersByRoom_Form]![WhatCompModel] Is Null
Then I saved the query.
I ensured that 'ComputersByRoom_Query' (the parameter query) was set as the
RecordSource property for the report.
However, when I open the report, the ComputersByRoom_Form is presented, the
value is selected from the combo box list, and the OK command button is
selected, the aforementioned Message Box error is returned:
"This expression is typed incorrectly, or it is too complex to be
evaluated. For example, a numeric expression may contain too many complicated
elements. Try simplifying the expression by assigning parts of the expression
to variables."
Once again, I am able to supply the parameter values for the remaining
fields (room number, state ID, and serial number) by typing the input into
the form fields and they all work perfectly--but not the combo box.
Any ideas?
PVic