Form that checks input formatting?

Kevin-anderson

New member
Local time
Today, 00:39
Joined
Jun 16, 2009
Messages
6
I have a form that lets a user input additional records into the database; however, different users are using different formats. Is it possible to prompt the user if the formatting is not correct. For example employee ID numbers are 5 digits with an "E" in the front ("E00000''), and many people are simply entering the information without the E. Any suggestions?
 
You can use an input mask -

\E00000;0_

(untested)
 
Maybe something like this on the before update of your textbox will give you some ideas..........

Dim strValue As String
Dim strLeft As String

strValue = "E"
strLeft = Left(strValue, 1)
If strLeft = Left(yourTextBox, 1) Then
MsgBox "yes it is E"
Else
MsgBox "No it is not E"

End If
 

Users who are viewing this thread

Back
Top Bottom