run-time erro '3134' when I try to execute a insert in Access 2010

Joined
Sep 5, 2011
Messages
2
Reaction score
0
This is my module
Public Function MovePart()
Dim db As DAO.Database
Dim strSql As String

strSql = "INSERT INTO TTransLog (Order, Item, Qty, Locat, UserLoc, DateLoc, TimeLoc, UserMove, DateMove, TimeMove, Area) VALUES ('" & [Forms]![Pickup]![Order] & "', '" & [Forms]![Pickup]![Item] & "', '" & [Forms]![Pickup]![qty] & "', '" & [Forms]![Pickup]![Locat] & "', '" & [Forms]![Pickup]![UserLoc] & "', '" & [Forms]![Pickup]![DateLoc] & "', '" & [Forms]![Pickup]![TimeLoc] & "', '" & [TempVars]![VUserConect] & "', '" & Date & "', '" & Time & "', 'area');"

Set db = DBEngine(0)(0)

db.Execute strSql, dbFailOnError


'MsgBox db.RecordsAffected & " record(s) were unpicked."
Set db = Nothing

End Function

when I execute this code give the error Run-time error '3134'. Please help me I dont'n know what it is wrong.
 
Joined
Dec 7, 2011
Messages
16
Reaction score
0
What is teh data type for DateMove and TiemMove>

If a Date/Time data type then use the date delimiter of # like this:

Code:
& "', #" & Date & "#, #" & Time & "#, 'area');"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top