I'm getting the error below when I'm trying to use a Combobox Value in my access query. I've placed the below reference to the combobox in the query criteria in design view.
The idea is that when I change the combobox the event triggers a procedure which calls the query. That query incorporates the value from Combobox50. I've also placed the code below as well. I've attached the file.
This is quiet a mystery.
Not sure if my syntax is wrong. Can anybody help. Thanks
[form]![form1]![combo2] 'have placed this in criteria field
Error below.
'Invalid SQL Statement; Expected Delete, Insert, Procedure, select or Update'
Code:Private Sub Combo2_AfterUpdate() Dim rst1 As Recordset Set rst1 = New ADODB.Recordset rst1.Open "RefLookup", CurrentProject.Connection ' "RefLookup" is the query name. Form_Form1.Text37.Value = rst1.Fields(1) End Sub