Group a set of controls within a Frame

  • Thread starter Thread starter scott56hannah
  • Start date Start date
S

scott56hannah

Hi,

I am using Access 2007 for this first time and I am trying to group a set of
controls (textbox, combo and listbox)....so that I can then enable that frame
or disable it in one statement.

I was able to do this in Excel forms, but I cannot seem to get the Frame
control to recognise the controls within it...the frame.enable works for the
frame but not the controls in it...

Any suggestions would be appreciated.

Thanks
Scott
 
Hi,

I am using Access 2007 for this first time and I am trying to group a set of
controls (textbox, combo and listbox)....so that I can then enable that frame
or disable it in one statement.

I was able to do this in Excel forms, but I cannot seem to get the Frame
control to recognise the controls within it...the frame.enable works for the
frame but not the controls in it...

A Frame (or Option Group) will work with Radio Buttons or Checkboxes only. It's not like a Frame in VB, which can be
container for many different things.

You can enable/disable those controls individually, or you can use the Tag trick:

1) Add a letter, number or phrase to the Tag property of each control you want to "group"
2) When you need to enable, run code like this:

Dim ctl As Control
On Error Resume Next
For each ctl in Me.Controls
If Me.Tag = "c" Then ctl.Visible = False
Next
Any suggestions would be appreciated.

Thanks
Scott

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Back
Top