On 21 Jun 2006 04:03:22 -0700,
(E-Mail Removed)
wrote:
> Hi Fred. Thanks for the reply. Now the command button is disabled no
> matter what the check box is.
>
> MainFrom = frmMovie
> Subform with just the rented checkbox = frmRental_subform
>
> I don't know if this makes a difference or not but the rental subform
> only shows if the checkbox on the subform is checked. If the movie is
> not rented then the check box doesn't show and that's when I would like
> to have the command button enabled so the user can rent the movie.
>
> Thanks,
> Cathy
> fredg wrote:
>> On 20 Jun 2006 12:00:01 -0700, (E-Mail Removed)
>> wrote:
>>
>>> Hi. I have a check box that is part of SubformA on MainFormA. I want
>>> to disable a command button that is on MainFormA if the check box is
>>> checked and enable it if the check box is not checked.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Cathy
>>
>> Code the check box AfterUpdate event:
>> Me.Parent.CommandButtonName.Enabled = Not Me![CheckBoxName]
>>
>> In the main form's Current event, write:
>> Me.CommandButtonName.Enabled = Not
>> Me.SubfrmDetails.Form.[CheckBoxName]
>>
>> where SubfrmDetails is the name of the subform control on the main
>> form.
>> --
>> Fred
>> Please respond only to this newsgroup.
>> I do not reply to personal e-mail
1) Did you understand this part of my reply?
> where SubfrmDetails is the name of the subform control on the main
form. <
SubfrmDetails is NOT the name of the form used as the sub form, but
the name of the control on the main form that holds the form that is
the sub form, i.e. the name of the control that you dragged onto the
main form from the tool box when you added the sub form to the main
form. You must change my SubfrmDetails to whatever your actual sub
form control name is.
2) Did you also code the main form Current event (and change the
control names to your actual control names)?
3) Is the check box bound to a field?
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail