Aug 04 2022 08:38 AM
I'm trying to do a custom Auto Numbering to create work order numbers based in Date, Time and Tech initials. I've figured out how to do this using a VBA script, but if I use DoCmd.Close at the end of the script it just over rights the same record each time and does not start a new. I'm thinking there is a missing piece or I'm using the wrong command, but I'm new to VBA.
I'm also trying to get the script to auto fill the date and time fields of the record as well as have drop downs that auto fill specific update specific fields. I think I figured out the drop downs to fill the fields, but none of this matters if it just over writes the same record each time.
If someone can point me in the right direction it would be helpful.
Thank you in advance.
Aug 04 2022 09:11 AM
Aug 04 2022 10:01 AM
Yes, The form has the VBA script embedded into a button.
The button closes the form and overwrites the record but does not create a new one. I'd like it to keep the form open so we can add more tickets.
what I have so far is this:
Option Compare Database
Private Sub Command3_Click()
Me.Work_Order = Format(Date, "yyyymmdd") + Format(Time, "hhmmss") + Me.Combo1
DoCmd.Close
End Sub
Apparently this is the wrong ending command.
Aug 04 2022 05:50 PM
Aug 05 2022 07:33 AM
Aug 05 2022 09:36 AM
Aug 05 2022 06:55 PM