Re: variables and for next statements
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Fri, 02 Jun 2006 15:14:34 -0500
Biggles wrote:
I currently have this code
ME.WD_FULL_HRS.VISIBLE = TRUE
ME.TX_FULL_HRS.VISIBLE = TRUE
ME.ITAG_FULL_HRS.VISIBLE = TRUE
there are many more fields of the same naming convention.
Ok, what I would like to do is:
For Each GRP in ("WD","TX","ITAG")
FHRS = "ME." & GRP & "_FULL_HRS"
EXIT FOR
NEXT
FHRS.VISIBLE = TRUE
Dim Itm As Variant
Dim Grp As Variant
For Each Itm IN Array("_FULL_HRS", . . .)
For Each Grp In Array("WD", "TX", "ITAG")
Me(Grp & Itm).Visible = True
Next Grp
Next Itm
--
Marsh
MVP [MS Access]
.
- Prev by Date: Re: Access 2007 Technical Questions
- Next by Date: Re: Another Message Box Question
- Previous by thread: Another Message Box Question
- Next by thread: Form Total Help
- Index(es):
Relevant Pages
|