Tomhoneyman
New member
- Local time
- Today, 06:09
- Joined
- Feb 16, 2016
- Messages
- 3
Okay, I am making a database and want to use a combo box to search a form and display date in a subform to give multiple search criteria.
I have followed a YouTube step but cant get it to work. The code is as below, anything jump out at you?
Private Sub cboSearchCustomer_AfterUpdate()
Dim myCustomer As String
myCustomer = "select from frmSearch where (Customer Name) = me.cboSearchCustomer "
Me.frmTest2SubForm.Form.RecordSource = myCustomer
Me.frmTest2SubForm.Form.Requery
End Sub
I am getting error message:
Runtime Error 3141
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
Tom
I have followed a YouTube step but cant get it to work. The code is as below, anything jump out at you?
Private Sub cboSearchCustomer_AfterUpdate()
Dim myCustomer As String
myCustomer = "select from frmSearch where (Customer Name) = me.cboSearchCustomer "
Me.frmTest2SubForm.Form.RecordSource = myCustomer
Me.frmTest2SubForm.Form.Requery
End Sub
I am getting error message:
Runtime Error 3141
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
Tom