How about something in the keypress event?
(untested)
Code:
Private Sub Text5_KeyPress(KeyAscii As Integer)
If Len(Me.Text5.Text) > 1 Then Exit Sub
Select Case KeyAscii
Case 65, 97
Me.Text5.InputMask = "AB-999\-9999\-9999;0"
Case 67, 99
Me.Text5.InputMask = "CD-999\-999999999;0"
Case Else
MsgBox "Must start with A or C"
Me.Text5.InputMask = ""
KeyAscii = 0
End Select
Me.Text5.Requery
End Sub
You'll need to tweak it a lot to deal with various scenarios but it may be the correct event.
If this helped, please click the star * at the bottom left and add to my reputation- Thanks