Solved

Determine changes in text boxes

Posted on 2002-03-10
6
122 Views
Last Modified: 2010-05-02
I have several text boxes on one form. How can I loop through each text box on the form and determine if there were any text changes. I only have 30 points to post.
0
Comment
Question by:Draner
6 Comments
 
LVL 1

Expert Comment

by:Neo78
Comment Utility
Are the text boxes initially empty? or they already have some info in them?
0
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 30 total points
Comment Utility
Hi,

Initially copy the content of the TextBoxes' Value into their Tag (in Form_Load() event). When running the program, Check the Tag and Value, if different then this means user make some changes, or simply define use a variable (maybe True or False), make it True if the Change event of TextBoxes is fired.
0
 

Author Comment

by:Draner
Comment Utility
Neo, the text boxes have info in them
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Draner
Comment Utility
Neo, the text boxes have info in them
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
Couldn't you just add code directly into the Change event procedure?  Or do you want to handle all of them in one block/batch rather than as they change?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
YOu could always set a Form level flag: blnTXTChange as Boolean

then, for each TextBox on the form, it the Change Event:

Private Sub ANYTEXTBOX_Change() ' for EACH TEXTBOX
   blnTXTChange = True
End Sub

then you can test blnTXTChange and know if ANY Textbox had a change to its value.

Hope this is clear.

Artur Wood
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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

6 Experts available now in Live!

Get 1:1 Help Now