You can't use a variable in an SQL statement (and x is a horrible thing to name a varialbe. What is it and what data type is it. Do yourself a favor and start using good naming conventions). You will have to create a control on your form and reference that. It can be hidden if you don't want the user to see it.
"Prince" wrote:
[Quoted Text] > Hi, > I am using simple SQL statement : > > Set Rs = Db.OpenRecordset("SELECT DetailPicknote.DTime, > DetailPicknote.DDate, DetailPicknote.DetailID FROM DetailPicknote WHERE > DetailPicknote.DetailID = x") > > where x = double > > Error: Too few parameters : Expected 1
|