What I would like to happen is when they click on "Add New Enquiry" a unique invoice number is generated and put into the field for them, is that possible?
Code to open the form is as follows
Expand|Select|Wrap|Line Numbers
- Private Sub cmdAddNewEnquiry_Click()
- On Error GoTo Err_cmdAddNewEnquiry_Click
- Dim stDocName As String
- Dim stLinkCriteria As String
- stDocName = "Job"
- DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
- Forms!Job!STATUS.Value = "ENQUIRY"
- Exit_cmdAddNewEnquiry_Click:
- Exit Sub
- Err_cmdAddNewEnquiry_Click:
- MsgBox Err.Description
- Resume Exit_cmdAddNewEnquiry_Click
- End Sub