Private Sub username_Click()
Dim TextPart As String
Dim NumberPart As String
If IsNull(Forename) Then Exit Sub
If IsNull(Surname) Then Exit Sub
If Len(Forename) < 3 Then Exit Sub
If Len(Surname) < 2 Then Exit Sub
TextPart = Left(Forename, 3) + Left(Surname, 2)
NumberPart = DMax("Right(UserName,4)", "tblmembers")
NumberPart = NumberPart + 1
username = TextPart & NumberPart
End Sub
This is the coding i have so far on my form, but i need to display a message box if the user is too youung or has not completed the form. can someone tell me how to layout the coding for a message box.
Thanks