Selasa, 05 November 2013

Re: [MS_AccessPros] Dim Variable question

 

Jim,

 

Giving the buttons generic names is usually ok, but if you want to give them functional names & achieve the same result, you could prefix each command button name with a specific character (say X) & then in a  For…Next loop iterate through each controll in the form and test the button name for the character and make Visible/Invisible as required.

 

e.g.

  Dim ctl As Control

'On Error Resume Next

  For Each ctl In Me.Section(0).Controls

     If (Left$(ctl.Name, 1) = "X") Then

        ctl.Visible =True

     End If

  Next ctl

 

Hope this helps.

 

Andrew

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar