Solved

Determine changes in text boxes

Posted on 2002-03-10
6
127 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
[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
6 Comments
 
LVL 1

Expert Comment

by:Neo78
ID: 6855214
Are the text boxes initially empty? or they already have some info in them?
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 30 total points
ID: 6855265
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
ID: 6855602
Neo, the text boxes have info in them
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:Draner
ID: 6855612
Neo, the text boxes have info in them
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6855644
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
ID: 6855674
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

738 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