field1A$ = Left$(doc.field1(0), 1)
field1B$ = Right$(doc.field1(0), 6)
If Not field1A$ Like "[A-Z]" And Not field1B$ Like "[0-9][0-9][0-9][0-9][0-9][0-9]" Then
Msgbox "Field 1 must contain an A-Z as the first character and 0-9 as the next 6 characters.", 48, "Incorrect Value!"
End If
Else
Msgbox "Field 1 must contain 7 characters.", 48, "Incorrect Value!"
field2A$ = Left$(doc.field2(0), 1)
field2B$ = Right$(doc.field2(0), 9)
If field2A$ = "0" And Not field2A$ Like "[0-9]" And Not field2B$ Like "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" Then
Msgbox "Field 2 must contain 10 characters and may not contain 0 as the first character.", 48, "Incorrect Value!"
End If
Else
Msgbox "Field 2 must contain 10 characters.", 48, "Incorrect Value!"