Solved

Provide warning when chartacer count reaches 250 count

Posted on 2014-10-10
2
127 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
2 Comments
 
LVL 39

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now