Group a set of controls within a Frame

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
 
S

Scott McDaniel

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
 

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