VB Var refering to object in access form

Reply

Join Date: Aug 2007
Posts: 11
Reputation: JaceDBN is an unknown quantity at this point 
Solved Threads: 0
JaceDBN's Avatar
JaceDBN JaceDBN is offline Offline
Newbie Poster

VB Var refering to object in access form

 
0
  #1
Nov 9th, 2007
Hi.,

I am busy with another access project when an idea occurred to me. Is it possible to refer to an object, lets say a command button - "Com12" using a VB expression. In application as follows:

Do until cnt = 15
str = "Com"&Cstr(cnt)
str.visible = True *****
cnt = cnt +1
loop

where str is string, and cnt is integer.

Normally i would do this:
com12.visible = true,
but the problem comes in where i would need to assign a value to a whole lot of objects.

Is there a way that I can use a varible, defined in a function or procedure to refer to an object in VB?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC