?
Solved

Text Box Array in Access 2000

Posted on 2003-03-27
4
Medium Priority
?
247 Views
Last Modified: 2008-01-09
Is it possible to create a text box array in Access 2000 similar to the text box arrays available in Visual Basic?
0
Comment
Question by:TheClicker
[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
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 8221579
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 8222293
No version of Access (VBA) supports control arrays, as they are supported in ful Visual Basic.

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 8222312
and the suggested website link is only a WEAK approximation.  The real reason for using Control Arrays is to be able to have 1 event handler, which can respond to ALL of the controls that make up the array.  Access CANNOT do anything close to that, as you must still provide separate event handlers for EACH of the controls, even if you can 'cycle' through the similar names.

txtTextName1 must have its own _Click() even handler, as must txyTextName2 and txtTextName3 and so on...there is no capability to have a SINGLE Eventhandler, that is passed the index of the specific TextBox that the user CLicked on, or raised some other even on.

AW
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 500 total points
ID: 8222329
No, you can't have a single event handler for multiple controls but you can write a single function and pass it the control name of the calling control. While it does mean you have to set the event property of each control to the call function, you do not require an event procedure for every control to do this.

There are limitations to this technique but it suffices for many operations.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

719 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