Referencing A Form

D

DS

I have this on a command button on the PadNumber form
I want this to happen on the Employees Form but I can't get the syntax.

Dim Ctl as Controls
For Each Ctl In Forms!Employees!Controls
If Forms!Employees!Ctl.Tag = "2" Then
Forms!Employees!Ctl.Visible = True
End If
Next Ctl

Any help appreciated.
Thanks
DS
 
S

Steve Schapel

DS,

The only thing I can see wrong here is the s on the end of Controls. Try...
Dim ctl As Control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top