954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB Var refering to object in access form

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?

JaceDBN
Newbie Poster
11 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You