Compile error: Argument not optional

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im trying to run and sql statement:

DoCmd.SetWarnings = False
DoCmd.RunSQL ("update AdditionalServiceRequests set request1 = 0
WHERE AdditionalServiceRequests.AdditionalServicesID= " &
[Forms]![Login]![MostRecentEventID] & " ;")
DoCmd.SetWarnings = True

but I get an error on this line:
DoCmd.SetWarnings = False

What does this mean and how do I fix it?..thanks
 
.... and the same for the 2nd SetWarnings.

--
HTH
Van T. Dinh
MVP (Access)


Robert Morley said:
Don't use an "=" sign, it's just
DoCmd.SetWarnings False



Rob

Jim said:
Im trying to run and sql statement:

DoCmd.SetWarnings = False
DoCmd.RunSQL ("update AdditionalServiceRequests set request1 = 0
WHERE AdditionalServiceRequests.AdditionalServicesID= " &
[Forms]![Login]![MostRecentEventID] & " ;")
DoCmd.SetWarnings = True

but I get an error on this line:
DoCmd.SetWarnings = False

What does this mean and how do I fix it?..thanks
 
Back
Top