I have 2 subforms in access 2010 database; Based on selection of subform1 field value , the vba program will run the subform2 output which common text fields in subform 1 and 2 as "supplier_name". So, I tried the "on double click" event on subform1 to write the currentRecord method see below,
Private Sub Supplier_name_DblClick(Cancel As Integer)
strSQL = "Select * from [Query1] where"
strSQL = strSQL & "[Supplier_name] ="'" & "Me!current record![Supplier_name]" &"'"
Form![Mainform]![Subform2].Form.RecordSource = strSQL
End Sub
I am getting Run-time error 3075 at the 2nd line; Syntax error (missing operator) in query expression '[Supplier_name] =Me!current record![Supplier_name]' Please help