Disable Command Button
On Sat, 09 Dec 2006 17:44:59 GMT, mdavis via AccessMonster.com wrote:
One more thing. When I close Form B and reopen it the command button is
enabled.
I would like the command button to be disabled as long as Combo Box B has a
value in it. If there isn't a value in the Combo Box than I would like the
Command Button to be enabled.
Could you please help me with the code for this?
Thank you.
fredg wrote:
Sorry I did not give the proper info.
Form B is the main form and is already opened. The user clicks a command
[quoted text clipped - 22 lines]
DoCmd.OpenForm "FormB"
forms!FormB!CommandButtonName.Enabled = False
Sure.
Forms!FormB!AnyOtherControl.SetFocus
Forms!FormB!CommandButton.Enabled = False
Code the Form's Current event:
Me!CommandButtonName.Enabled = Not IsNull(ComboB)
in which case there will most likely be no need to set it from FormA.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
|