A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Disable Button on Opening Form



 
 
Thread Tools Display Modes
  #1  
Old September 3rd, 2009, 03:48 PM posted to microsoft.public.access.forms
Abe Katz
external usenet poster
 
Posts: 43
Default Disable Button on Opening Form

Hello All,

When I open a form I disable one of the buttons like this,
DoCmd.OpenForm "Ship List"
Forms![Ship ListDT]!ctlButton.Enabled = False

But it doesn't work when I open the form with acDialog option like this,
DoCmd.OpenForm "Ship List", , , , , acDialog

I know why, because the execution stops, when you open as a dialog form.

What can I do to disable the button even when opened as a dialog?
Thanks
Abe


  #2  
Old September 3rd, 2009, 05:16 PM posted to microsoft.public.access.forms
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Disable Button on Opening Form

Hi Abe,

Do the disabling inside the "Ship List" form's On Open event instead.

Clifford Bass

"Abe Katz" wrote:

Hello All,

When I open a form I disable one of the buttons like this,
DoCmd.OpenForm "Ship List"
Forms![Ship ListDT]!ctlButton.Enabled = False

But it doesn't work when I open the form with acDialog option like this,
DoCmd.OpenForm "Ship List", , , , , acDialog

I know why, because the execution stops, when you open as a dialog form.

What can I do to disable the button even when opened as a dialog?
Thanks
Abe

  #3  
Old September 3rd, 2009, 09:49 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Disable Button on Opening Form

And if you do not always want the form to open with the button disabled, as
Clifford suggested, you can set a value in the form open command's OpenArgs
on Form1, then check OpenArgs on opening Form2, and set the button
conditionally.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200909/1

 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.