Solved

Provide warning when chartacer count reaches 250 count

Posted on 2014-10-10
2
140 Views
Last Modified: 2014-10-10
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

0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 40373841
Steve!
If you had chance to view answers to your question Q_28533720, you should not ask this question.
Try
lngNumberOfCharacters = Len(Me.txtUpdate.Text)
0
 

Author Comment

by:SteveL13
ID: 40373865
Thanks.  That worked.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question