[AccessD] Turning Custom MenuBar Options On/Off

Bobby Heid bheid at appdevgrp.com
Tue Oct 5 10:25:06 CDT 2004


Paul,

Here is some example code for you:

   With CommandBars("Wrap Reports/Utils")
      .Controls("Letters").Enabled = bTF
      .Controls("Reports").Enabled = bTF
      With .Controls("Utilities")
         .Controls("Certificate Default Values").Enabled = bTF
         .Controls("Conversion Log").Enabled = bTF
         .Controls("Coverages").Enabled = bTF
         End With
	end with

The name of the command bar is "Wrap Reports/Utils".  There is a sub menu
named "Utilities".

You could use something like:
CommandBars("Wrap
Reports/Utils").Controls("Utilities").Controls("Coverages").Enabled = true

You should also be able to set visible instead of the enabled as shown here.

The code is in a function that is passed a boolean.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net
Sent: Tuesday, October 05, 2004 10:42 AM
To: accessd
Subject: [AccessD] Turning Custom MenuBar Options On/Off


To all,
Believe it or not I have used Access for a few years now, and have only just
started using the custom menu bars.  I have a MenuBar called B&Q, which in
turn has three menus on it (File Options, Edit Options, Report Options),
which in turn have options that the user can select. Does anyone have any
sample code or can tell me where to get some sample code on turning the
various options on/off Thanks in advance for all your help Paul Hartland





More information about the AccessD mailing list