Subfrom text box field size

roosn

Registered User.
Local time
Today, 23:16
Joined
Jul 29, 2005
Messages
121
Hi
i would like to limit a text box field size to less than 400.
in the event of leaving the text box to ether go to another control on the sub form, or go to the parent form, i would like to create my own error message box, rather than rely on the access default message box.
Would anyone be so kind as to point me in the right direction
Many Thanks
RN
 
On the BeforeUpdate event of YourField:
If Len(Me!YourFieldName) > 400 Then
MsgBox "Your Message"
Cancel = True
End If
 
first, to get a text length greater than 255, you have to call it a memo field

more importantly, what you are trying to do will REALLY irritate your users, if they type or paste thousands of characters in the box, and then you stop them saving their entry.
 

Users who are viewing this thread

Back
Top Bottom