473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Refer to a control by its index

I found this in the Help file:
' Refer to a control by its index in the controls
' collection.
Me(0)

Can I view a list of controls on a form and see their index numbers?
Or how do I find the index numbers?

Thanks.
Nov 13 '05 #1
2 1341
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Including your previous post:

The usual way to use control arrays in Access is to name controls
something like "txtField1," "txtField2," etc. Then iterate thru them
like this:

dim i as integer

for i = 1 to 2
Debug.Print Me("txtField" & i)
next i

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQS+WeIechKqOuFEgEQKkqwCgi6aMvKMJnD1+VaTNvTE43j x1dIYAn1gA
O6Xk1Pt/OGIzlP/MhJLGpfkz
=TBcA
-----END PGP SIGNATURE-----

RBohannon wrote:
I found this in the Help file:
' Refer to a control by its index in the controls
' collection.
Me(0)

Can I view a list of controls on a form and see their index numbers?
Or how do I find the index numbers?

Thanks.


Nov 13 '05 #2
ra*****@hotmail.com (RBohannon) wrote in
news:ad**************************@posting.google.c om:
I found this in the Help file:
' Refer to a control by its index in the controls
' collection.
Me(0)

Can I view a list of controls on a form and see their index
numbers? Or how do I find the index numbers?

Thanks.


You can loop through the index collection and return each name.
--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Randi | last post by:
Hi all, I have this project to use the ADODB control to acces and manipulate the Access DB. I amd the mistake of first doing this project with just the data control. It worked fine with this...
3
by: Joshua Ammann | last post by:
Hi, (Using Access 2000) I have two tables, similar to Customers and Orders. (Not an exact parallel, but works for this example.) On a form showing customer data, there is a tab control. One...
1
by: Marcus | last post by:
Anyone know why when I set my tabs index in my tab control (I have 3 tabs on the control) the numbering gets messed up when I save the form changes? I thought each tab on the control had an...
1
by: Jeff S | last post by:
Using VB.NET/code behind, I'd like to programmatically access 15 imagebutton controls by their ID (or some other identifying string). The ID of each of the imageButton controls is Thumb0, ...
7
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? ...
2
by: GY2 | last post by:
How do I refer to controls by a string variable name instead of by integer item index? A form contains 7 rich textbox controls labeled rtb1-rtb7. In VB6 I could use the following code to loop...
2
by: Gidi | last post by:
Hello, I've a strange problem with substring function. I'm geting a string from my SQL DataBase and i want to split it to two substings. here is what i do: if(temp.Length>80 &&...
10
by: Bill Nguyen | last post by:
I have several textbox controls in a form,. I name them txt1, txt2, ... txt10. How dow I refer to them in a loop to get the value in text proerty of each control? For x = 1 to 10 value =...
0
by: Rick | last post by:
I have a base class from which I descend business objects like Customer, Orders etc. The objects have properties like CustNum, CustName etc. I want to refer to these property names by index so...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.