Solved

How to group common properties ?

Posted on 1998-09-12
3
121 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

19 Experts available now in Live!

Get 1:1 Help Now