Question : How Can I Trigger a Select Max Value Statement from an Access Form

I am trying to use the following code to create a unique number when the value of a field names "Status" is changed to "Approved"

I have it in a Private sub in the AfterUpdate Event of the Status Field.

I keep getting a compile error when trying to run it. It stops on the "set" term.

I am at a loss on how to proceed
Code Snippet:
1:
Update CAR_Requests set CAR_Num = (select max(CAR_Num)+1 as NewID from CAR_Requests) where AutoID = myAutoID

Answer : How Can I Trigger a Select Max Value Statement from an Access Form

test this
Random Solutions  
 
programming4us programming4us