Sort's likely a reserved word. If you cannot (or will not) rename the field,
at least put square brackets around it:
DoCmd.RunSQL "UPDATE tblDeliverableTrackingAlt SET
[ActCompDate]=Date(),[EstHourstoComplete]= 0 WHERE
tbldeliverableTrackingAlt.CaseRecordNumber = " &
CLng(Me.CaseRecordNumber) & " And tbldeliverabletrackingalt.[Sort] = " &
CLng(Me.Sort)
If that doesn't solve it, are both CaseRecordNumber and Sort numeric fields?
(That's what your SQL implies). If, for example, CaseRecordNumber happens to
be text, you'll need to put quotes around the value:
DoCmd.RunSQL "UPDATE tblDeliverableTrackingAlt SET
[ActCompDate]=Date(),[EstHourstoComplete]= 0 WHERE
tbldeliverableTrackingAlt.CaseRecordNumber = " & Chr$(34) &
CLng(Me.CaseRecordNumber) & Chr$(34) & " And
tbldeliverabletrackingalt.[Sort] = " & CLng(Me.Sort)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Doug,
>
> Thanks for your help. The object error went but now I am getting a
> error message cannot update database, conversion error, and validation
> run violations.
>
> Would greatly appreciate any suggestions.
>
> US
>
>
>
> Douglas J. Steele wrote:
>> DoCmd.RunSQL "UPDATE tblDeliverableTrackingAlt SET
>> [ActCompDate]=Date(),[EstHourstoComplete]= 0 WHERE
>> tbldeliverableTrackingAlt.CaseRecordNumber = " &
>> CLng(Me.CaseRecordNumber) & " And tbldeliverabletrackingalt.Sort = " &
>> CLng(Me.Sort)
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > All,
>> >
>> > Can you please let me know what I am doing wrong. I am getting an error
>> > 24 object required.
>> >
>> > Also do I need to do a refresh or a requery to stay in the same
>> > location.
>> >
>> > thanks for your help.
>> >
>> > us.
>> >
>> > DoCmd.RunSQL "UPDATE tblDeliverableTrackingAlt SET
>> > [ActCompDate]=Date(),[EstHourstoComplete]= 0 WHERE
>> > tbldeliverableTrackingAlt.CaseRecordNumber = " &
>> > CLng(Me.CaseRecordNumber) And tbldeliverabletrackingalt.Sort =
>> > CLng(Me.Sort)
>> >
>