- 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.
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.