Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Provide warning when chartacer count reaches 250 count

Posted on 2014-10-10
2
Medium Priority
?
150 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 40

Accepted Solution

by:
als315 earned 2000 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

Independent Software Vendors: 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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

885 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