Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Provide warning when chartacer count reaches 250 count

I'm trying to provide an audible and message box alert when the user reach a character count of 250 characters in a text box with 255 characters max.

Here is my code but is not working:

Private Sub txtUpdate_Change()

Dim lngNumberOfCharacters As Integer
Dim Update As String
lngNumberOfCharacters = Len(Me.txtUpdate)

    If lngNumberOfCharacters = 250 Then
    DoCmd.Beep
        MsgBox "You have typed 250 characters and the limit is 255 characters."
    End If

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

Thanks.  That worked.