Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 November 21st, 2006, 11:51 AM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default Activate or Deactivate controls on forms

Hi,

I don't know how to go about this: I have an order form that can be accessed by different menus. If the order form is opened from MenuA, I want certain controls to be invisible and deactivated, but if the order form is opened from MenuB, all controls are active.

Thanks!

 
Old November 21st, 2006, 12:16 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Create a copy of the form and deactivate the controls on it and call the copy from MenuA.

mmcdonal
 
Old November 21st, 2006, 12:27 PM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default

That is what I currently do, but I end up with several versions of a form. When I need to do a change in the original form I have to do the same changes to all the copies and this leaves room to error when I forget a form. I would have appreciated finding a way around this.

Thanks anyways.

 
Old November 27th, 2006, 08:03 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Open the form with OpenArgs set to "MenuA" or "MenuB"... then in the load Event of the form, evaluate the OpenArg and set the control.enabled = false or true as appropriate.

Lee





Similar Threads
Thread Thread Starter Forum Replies Last Post
access other Forms Controls angelboy C# 2005 1 September 9th, 2007 10:35 AM
Let user make forms and controls smang VB.NET 2002/2003 Basics 0 September 2nd, 2005 04:06 PM
Can Forms/controls be accessed remotely wizbang Pro VB 6 0 November 11th, 2004 07:46 PM
TomCat 5.0.19 CaseSensitive deactivate mulle78 Apache Tomcat 0 May 11th, 2004 07:05 AM





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