Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 21st, 2006, 11:51 AM
Authorized User
 
Join Date: Feb 2004
Location: , , Canada.
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!

Reply With Quote
  #2 (permalink)  
Old November 21st, 2006, 12:16 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old November 21st, 2006, 12:27 PM
Authorized User
 
Join Date: Feb 2004
Location: , , Canada.
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.

Reply With Quote
  #4 (permalink)  
Old November 27th, 2006, 08:03 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:29 PM.


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