[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Change controls programatically on a form

Hi Experts,

I have 38 fields on a form named T1 to T38, and I need to be able to make them visible/invisible based on values in a table.

I have everything else working - but the bit I need help with is as follows:

Dim Counter As Integer
Counter = 1
t & Counter.Visible = True

Brings back "Cannot find control t & counter" rather than t1 - and I've exhausted my ideas.

Anyone?
0
Norbert2000
Asked:
Norbert2000
  • 3
1 Solution
 
flavoCommented:
Me.Controls("t" & Counter).Visible = True

Dave
0
 
flavoCommented:
Glad to help, good luck with the rest of your project(s)

Dave :^)
0
 
Norbert2000Author Commented:
Dave,

I've never met you but with my current deadline I love you.

Norb.
0
 
flavoCommented:
LOL!  I know the felling :P

Dave
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now