From: Mannie G on
I have a database for members of an organisation some of whom belong to
sub-committees (of which there are many). On the main 'Members' form there
is a 'Committees Subform shown. How can I hide the subform if the member
does not belong to any of the committees?

Your suggestions would be appreciated.

--
Thanks

Mannie G
From: stumac on
Hi Mannie - you could use the 'on current' event of the form to check if
there is any records in the sub-committee table and hide the subform if no -
something like:

If DCount("*", "SubCommittee", "[memberID] = " & Me.memberID) > 0 Then
Me.mysubform.Visible = True
Else
Me.mysubform.Visible = False


Obviously you need to put the correct table, field and subform names in.

Hth
Stu

"Mannie G" wrote:

> I have a database for members of an organisation some of whom belong to
> sub-committees (of which there are many). On the main 'Members' form there
> is a 'Committees Subform shown. How can I hide the subform if the member
> does not belong to any of the committees?
>
> Your suggestions would be appreciated.
>
> --
> Thanks
>
> Mannie G
From: Mannie G on
Great, thanks -all working well.
--
Thanks

Mannie G


"stumac" wrote:

> Hi Mannie - you could use the 'on current' event of the form to check if
> there is any records in the sub-committee table and hide the subform if no -
> something like:
>
> If DCount("*", "SubCommittee", "[memberID] = " & Me.memberID) > 0 Then
> Me.mysubform.Visible = True
> Else
> Me.mysubform.Visible = False
>
>
> Obviously you need to put the correct table, field and subform names in.
>
> Hth
> Stu
>
> "Mannie G" wrote:
>
> > I have a database for members of an organisation some of whom belong to
> > sub-committees (of which there are many). On the main 'Members' form there
> > is a 'Committees Subform shown. How can I hide the subform if the member
> > does not belong to any of the committees?
> >
> > Your suggestions would be appreciated.
> >
> > --
> > Thanks
> >
> > Mannie G
 | 
Pages: 1
Prev: Update a record
Next: Repeating data in table