Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2004, 07:07 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple controls - grouped

Hi - I'm wondering if anyone knows of a way to group a bunch of controls which are (at the moment) contained within a frame. What I have is a form which has different controls placed in 3 separate frames. What I'd like to do is have some way of enabling and disabling all the controls (in one go)in whatever frame depending on the user who accesses the form. I've done this before coding C++ using a panel but I can't seem to find any components available with this functionality in access.

Can anybody help me out or is it simply many enable/disable calls in my code?

William
__________________
William
 
Old August 3rd, 2004, 10:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

An easy way to do this is put tags on them in their TAG property, e.g. Group1, Group2, etc.

Then you can cycle enable/disable them in one shot.

Dim ctlMyControl as Control

For Each ctlMyControl in Me
   If ctlMyControl.Tag = "Group1" Then
      ctlMyControl.Enable = True
   End IF
Next ctlMyControl


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old August 4th, 2004, 04:07 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many Thanks Greg - that did the trick.

William





Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple constructors for custom controls three BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 0 May 1st, 2006 03:24 PM
Multiple Databound controls for one database field melbsurfer ASP.NET 2.0 Basics 6 March 29th, 2006 06:33 PM
numbers on grouped records mkapler Access 2 March 6th, 2005 05:49 PM
Multiple user controls on a page kriskramer General .NET 2 September 14th, 2004 08:42 AM
Averaging Grouped Data Andy Hodges SQL Language 1 April 6th, 2004 09:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.