A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Array or controls on a form?



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2010, 03:12 AM posted to microsoft.public.access.forms
.Len B
external usenet poster
 
Posts: 81
Default Array or controls on a form?

I have a form with an option box containing 8 options for filtering
purposes.
Option Value 1 represents All
Option Value 2 represents Manager
Option Value 3 represents Keyworker etc.

The controls are named thus -
optRole1 lblRole1
optRole2 lblRole2 etc

Can I somehow change the names to
optRole(1) lblRole(1)
optRole(2) lblRole(2) etc

so that I can replace code like this
If mablnRoleActive(3) Then
lblRole3.BackColor = malngRoleBakGnd(3)
lblRole3.Caption = mastrRoleCaption(3)
Else
lblRole3.Visible = False
optRole3.Visible = False
End If
with a For / Next loop. In other words I want to change the left side of
the assignments to lblRole(x).property = ma...

--
Len
__________________________________________________ ____
remove nothing for valid email address.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.