Connecting Tech Pros Worldwide Forums | Help | Site Map

Referring to SubForm/SubSubform controls

pietlinden@hotmail.com
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a hopefully stupid question. First off, I'm trying to follow
Keri Hardwick's instructions from here:

http://www.mvps.org/access/forms/frm0031.htm

I have a main/sub1/sub-subform: Contact/Donation/DonationType (I'm
using Rebecca Riordan's subclassing article, which works great until I
put the Donation Parent (with the Donation Child inside it)).

Once I nest so there are 3 forms, one inside another:
Parent: Donor
Child: Donation Parent (date etc - common to all donation types)
Grandchild: Donation Child (specific types of donation)

There's a combobox on Child that should change the visible property of
the 3 Grandchild subforms. I *thought* i was following the
instructions right, but no matter what I do, I can't get the code in
the Change/Exit events of the child's combobox, I can't get the
grandchild forms' Visible properties to set. (Setting 2 of the 3
invisible.)

Example of syntax that doesn't work:

form structure:
Donor--(1,M)--DonationMain--(1,1)--DonationSub

The code is on DonationMain.

Private Sub cboDonationType_Exit(Cancel As Integer)

If Me.cboDonationType = "Money" Then
Forms![Contact]![Donation].Form![GiftOfMoney].Form.Visible = True
Forms![Contact]![Donation].Form![GiftOfTime].Form.Visible = False
Forms![Contact]![Donation].Form![GiftInKind].Form.Visible = False
End If
End Sub

What am I doing wrong? (Umm... that would be BREATHING. You stop and
we'll answer your question.)

Thanks,
Pieter


rkc
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Referring to SubForm/SubSubform controls


pietlinden@hotmail.com wrote:[color=blue]
> I have a hopefully stupid question. First off, I'm trying to follow
> Keri Hardwick's instructions from here:
>
> http://www.mvps.org/access/forms/frm0031.htm
>
> I have a main/sub1/sub-subform: Contact/Donation/DonationType (I'm
> using Rebecca Riordan's subclassing article, which works great until I
> put the Donation Parent (with the Donation Child inside it)).
>
> Once I nest so there are 3 forms, one inside another:
> Parent: Donor
> Child: Donation Parent (date etc - common to all donation types)
> Grandchild: Donation Child (specific types of donation)
>
> There's a combobox on Child that should change the visible property of
> the 3 Grandchild subforms. I *thought* i was following the
> instructions right, but no matter what I do, I can't get the code in
> the Change/Exit events of the child's combobox, I can't get the
> grandchild forms' Visible properties to set. (Setting 2 of the 3
> invisible.)
>
> Example of syntax that doesn't work:
>
> form structure:
> Donor--(1,M)--DonationMain--(1,1)--DonationSub
>
> The code is on DonationMain.
>
> Private Sub cboDonationType_Exit(Cancel As Integer)
>
> If Me.cboDonationType = "Money" Then
> Forms![Contact]![Donation].Form![GiftOfMoney].Form.Visible = True
> Forms![Contact]![Donation].Form![GiftOfTime].Form.Visible = False
> Forms![Contact]![Donation].Form![GiftInKind].Form.Visible = False
> End If
> End Sub
>
> What am I doing wrong? (Umm... that would be BREATHING. You stop and
> we'll answer your question.)[/color]

I would say that you should be working with the visibility of
the subForm control not the form in the control.


XMVP
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Referring to SubForm/SubSubform controls



<pietlinden@hotmail.com> wrote in message
news:1124002052.560040.151820@f14g2000cwb.googlegr oups.com...

[color=blue]
> What am I doing wrong?[/color]


1. Keri Hardwick

2. http://www.mvps.org/access

3. Rebecca Riordan



Closed Thread