Solved

How to group common properties ?

Posted on 1998-09-12
3
125 Views
Last Modified: 2010-04-30
Hi.
I'm trying to change in "execution time" the Datachange property of 10 textbox. I use a button to validate a new record of these 10 textbox but I need use the same button if I want to modify one of the records that I have done. Cause I put in the code of the button the Addnew..and Update, I want to identify when a textbox change its data (by datachange) and then in the code of this button I can to reconogize the change and I can substitute the Addnew by an Edit..Update. My problem is that I have to write the whole property datachane of the 10 textbox and if any of these changes, then use the modify option of the button and not the "addnew option". How can I simplify the code? Can I to group the Datachange property of the whole textbox
0
Comment
Question by:netkuk
3 Comments
 
LVL 2

Expert Comment

by:wj7ster
ID: 1434472
Can you say that again?  It is not very clear what you try to achieve.

Thank you.
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1434474
Make a control array out of your text boxes. Then when the event fires you'll get an INDEX value that tells you which of the controls had the event. Your code can then use the index for whatever. This allows one event sequence instead of 10.

M

0
 

Author Comment

by:netkuk
ID: 1434475
that solves my problem but I have to give the same name (in an array) in all the textbox and I have to control myself a maskedbox that I can't join with the array. Thank you anyway mark2150
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

808 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