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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing parameter in setting recordset

Status
Not open for further replies.

rana

Technical User
Jul 5, 2000
20
0
0
US
I'm getting an error that I am missing a parameter in the "Set rstRequests = ..." line. What does this mean and how do I correct it?

mySQL = "select * from Requests where Request_ID = forms.[end_request].Item_ID"
Set rstRequests = db.OpenRecordset(mySQL)
wrkspace.BeginTrans
With rstItems
.Index = "PrimaryKey"
.Seek "=", Item_ID
.Edit
!Available = True
!Building_ID = Me.Building_ID
!Room_ID = Me.Room_ID
.Update
End With
 
Here's the problem Rana


Change this line...
mySQL = "select * from Requests where Request_ID = forms.[end_request].Item_ID"

...to read
mySQL = "select * from Requests where Request_ID =" & forms.[end_request].Item_ID

Also, a quick tip for debugging this kind of situation is to add a 'debug.print mySQL' statement immediately after the assignment to the variable (in this case mySQL), set a break point on the assignment statement, open the debug window (<ctl> G), then trace throught that section of code (with F8) when execution stops on that line. I sometime use a 'MsgBox mySQL' instead of 'debug.print', to examine how things are working.

Hope this is helpful. Problems ? Let me know.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top