Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Query Correct Format. 1

Status
Not open for further replies.

bsupport

Programmer
Dec 20, 2000
53
US
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!
 
Change the Dot . after ME to a Bang !

Me!lngProposalID

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top