Hi,
I'm desperately seeking your help on this one... my form has stopped working correctly, each time i populate the mandatory fields, and I then save the form, i get the following error message on the Visual Basic page
Private Sub Form_AfterInsert()
Me.txtFirstEntered = Date
Me.txtEnteredBy = Environ("Username")
If Me.txtLeadDivision = "Corporate" Or Me.txtLeadDivision = "Trust-wide" Or Me.txtLeadDivision = "Primary Care" Or Me.txtLeadDivision = "1" Or Me.txtLeadDivision = "2" Or Me.txtLeadDivision = "3" Or Me.txtLeadDivision = "4" Or Me.txtLeadDivision = "5" Or Me.txtLeadDivision = "A" Or Me.txtLeadDivision = "B" Or Me.txtLeadDivision = "C" Or Me.txtLeadDivision = "D" Then
Me.txtNewProjectID = ("CA" & Me.txtLeadDivision & "-" & Format(Me.txtArbitraryNumber, "00000") & "-" & Right(Me.txtFirstEntered, 2))
Else
Me.txtNewProjectID = ("CA" & "0-" & Format(Me.txtArbitraryNumber, "00000") & "-" & Right(Me.txtFirstEntered, 2))
End If
MsgBox ("The code for the audit you just registered is " & Me.txtNewProjectID & ".")
End Sub
I think it may be something to do with txtArbitraryNumber but im not 100% sure or dont know where to start in fixing it