error 3061 too few parameters, expected 5?

Bigmo2u

Registered User.
Local time
Yesterday, 22:20
Joined
Nov 29, 2005
Messages
200
Here is the code:

Code:
With db
                               
    .Execute "INSERT INTO tblCurrentLocation (SerialNumberID, SiteLocationID, ZoneID, SectionID, RowID, BayID, clDate, clTime) " & _
             "VALUES('" & ssn & "', sli, zid, sid, rid, bid, #" & cld & "#, #" & clt & "#)"

End With

there are more than 5 parameters, I was having issues before thei with the date fields.

form that is passing these variables are set to what they are suppose to be on the form.
 
There are 5 values (variables?) not concatenated into the string as the others are. ;)
 
okay, I kind of get what you ar elooking at. I have 5 number fields, 1 string and 2 date/time fields. So what am I doing wrong?
 
All of the values need to be concatenated into the string. You have correctly surrounded date values with #, the text value with '. Numeric values don't need a delimiter, but still need to be concatenated.

"VALUES('" & ssn & "', " & sli & ",..."
 
No problem; post back if you get stuck.
 

Users who are viewing this thread

Back
Top Bottom