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

dlast with string criteria

Status
Not open for further replies.

mxfrail

MIS
Jul 7, 2008
25
0
0
US
I am probably just missing something -

dlast(""chargeid"", ""tblcontractaddlchargeshdr"", ""UserEntered ="" & CurrentUser)"

I error unknown.

My full sql is -

DoCmd.RunSQL "Update tblContractAddlChargesHDR set expirationdate = #" & txtToDate & "#, effectivedate = #" & txtFromDate & "# where chargeid = dlast(""chargeid"", ""tblcontractaddlchargeshdr"", ""UserEntered ="" & CurrentUser)"

Can anyone help with this? Thanks.
 
Maybe:
Code:
DoCmd.RunSQL "Update tblContractAddlChargesHDR set expirationdate = #" & txtToDate & "#, effectivedate = #" & txtFromDate & "# where chargeid = dlast(" & Chr(34) & "chargeid" & Chr(34) & ", " & Chr(34) & "tblcontractaddlchargeshdr" & Chr(34) & ", " & Chr(34) & "UserEntered = " & CurrentUser & Chr(34) & ")"
Hope this helps

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top