By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Refer to a control by its index

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
-----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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.