Link to home
Start Free TrialLog in
Avatar of jason_pleaner
jason_pleaner

asked on

Runtime error '3078' even though SQL string appears correct

Experts,

Could someone shed some light on this little problem. Below is the VBA code used to update the delivery date fields for a customer in a table called tbl_temp_orders. It is executed after the date within the tbx_clients_nextcall  textbox is changed on a form.

I have checked the resulting strSQL using MsgBox and all seems perfect BUT i get the following error:  

Runtime error '3078'
The Microsoft Jet Database Engine cannot find the input table or query ". Make sure it exists and that its mane is spelled correctly.

Thanks in Advance

Jason




Sub UpdateDeldate_TempOrdersTable()
Dim strSQL As String
 
'Create SQL string to update the deldate in tbl_temp_orders when the delivery date is changed
strSQL = "UPDATE tbl_temp_orderentry SET tbl_temp_orderentry.deldate = #" & Format$(Me.tbx_clients_nextcall, "mm\/dd\/yyyy") & "# WHERE (tbl_temp_orderentry.code) = '" & Trim(Me!code) & "';"

'Execute strSQL
DBEngine(0)(0).Execute strSQL1, dbFailOnError

End Sub
SOLUTION
Avatar of ADSaunders
ADSaunders

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Natchiket
Natchiket
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jason_pleaner
jason_pleaner

ASKER

Thanks all,

At the end of the day I figured out another way to do it.

Jason