How do you write a Select query statement in the Microsoft Access Visual Basic Editor screen using a variable in the where clause?
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Select * FROM tblProposalProducts " _
& "WHERE lngProposalID = " & Me.lngProposalID)
I get an error message stating "Syntax Error (missing operator) in query expression 'lngProposalID'."
Can anyone help. Thanks!
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Select * FROM tblProposalProducts " _
& "WHERE lngProposalID = " & Me.lngProposalID)
I get an error message stating "Syntax Error (missing operator) in query expression 'lngProposalID'."
Can anyone help. Thanks!