jonathanchye
Registered User.
- Local time
- Today, 05:47
- Joined
- Mar 8, 2011
- Messages
- 448
I have a button which opens a form referencing to the record selected in my main form's combobox (Combobox name is cboName)
The form I am opening is called frmCustomerDB and the field I am referencing to in that form is [CustomerName].
Here is my code:
I have the following error showing :
Run-time error '3075'
Syntax error (missing operator) in query expression '[CustomerName]=ACME CO LTD'
Is it because of the spaces?
The form I am opening is called frmCustomerDB and the field I am referencing to in that form is [CustomerName].
Here is my code:
Code:
Dim temp As String
temp = "[CustomerName]=" & cboCustomer.Value
DoCmd.OpenForm "frmCustomerDB", , , temp
I have the following error showing :
Run-time error '3075'
Syntax error (missing operator) in query expression '[CustomerName]=ACME CO LTD'
Is it because of the spaces?