Brilliant Allen worked a treat. Sorry to be a pest but I have one last
question. On one of my fields I already have a before update event set up
to
check that that field matches another one with the code
Private Sub COURSE_CODE_BeforeUpdate(Cancel As Integer)
If Left(Me.[course Code], 2) <> Me.[SCHOOL] Then
MsgBox "Course Code does not match the school code"
Cancel = True
End If
End Sub
How do I nest two bits of code on this event so that I can use the code
you
gave me to stipulate a required field length?
As you have already guessed I a do not use VB.
Thanks Again in advance
Allen Browne said:
Use the BeforeUpdate event, and could the length of the input:
Private Sub Text0_BeforeUpate(Cancel As Integer)
If Len(Me.Text0) < 12 Then
Cancel = True
MsgBox "Type at least 12 characters, or press Esc to undo."
End If
End Sub
Blade370 said:
Thanks Allen that worked great. One last question is there a way to
make a
user enter a minimum amount of characters, numbers etc in a certain
field
before they are allowed to move to the next field?
:
Use the AfterUpdate event procedure of the control to convert to upper
case:
Me.[Text0] = UCase(Me.[Text0])
Replace Text0 with the name of your text box.
If you want it converted in real type, you could use the control's
KeyDown
event.
I have a field in a form that requires the whole thing to be
capitals.
Is
there any way apart from using an input mask that would allow me to
do
that?