help! hiding tabs in a sub-form.

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

I have a form that shows contact details. This form also
has a sub form which shows lists of other contacts that
are associated with the current contact. The object name
for the sub form is sfrmAssociatedContacts and is bound to
the [Associated Contacts] form.

The [Associated Contacts] form has several tabs, but I
only want to show the tabs that are relevant to the
current contact record in the main form. That is, I may
want to hide or show other tabs depending on values of the
current contact record.

I thought I could add a public method in the [Associated
Contacts] form module called SetTabs and then call it in
the main form's Form_Current() event routine, as follows:

sfrmAssociatedContacts.SetTabs

However, the routine is not recoginised as being part of
the sfrmAssociatedContacts object.

Can someone advise me how best to implement what I need?

Thanks,

Dan.
 
Hi Dan,

Your current reference is to a method or property of the subform control
(not the form which is viewed through the subform control). The public
procedure belongs to the subform control's form - just change the reference
to this:

sfrmAssociatedContacts.form.SetTabs
 
Hi Sandra,

I did actually realise what I had done wrong about 1
minute after posted the message.

Thanks, though!!!

BTW, what does MVP stand for?

Dan.



-----Original Message-----
Hi Dan,

Your current reference is to a method or property of the subform control
(not the form which is viewed through the subform control). The public
procedure belongs to the subform control's form - just change the reference
to this:

sfrmAssociatedContacts.form.SetTabs


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
I have a form that shows contact details. This form also
has a sub form which shows lists of other contacts that
are associated with the current contact. The object name
for the sub form is sfrmAssociatedContacts and is bound to
the [Associated Contacts] form.

The [Associated Contacts] form has several tabs, but I
only want to show the tabs that are relevant to the
current contact record in the main form. That is, I may
want to hide or show other tabs depending on values of the
current contact record.

I thought I could add a public method in the [Associated
Contacts] form module called SetTabs and then call it in
the main form's Form_Current() event routine, as follows:

sfrmAssociatedContacts.SetTabs

However, the routine is not recoginised as being part of
the sfrmAssociatedContacts object.

Can someone advise me how best to implement what I need?

Thanks,

Dan.

.
 
You're welcome Dan, glad you figured it out.

MVP stands for Most Valuable Professional. The Microsoft Most Valuable
Professional (MVP) Award is an annual award that is given to outstanding
members of Microsoft's peer-to-peer communities. You can read more about it
at http://mvp.support.microsoft.com

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Hi Sandra,

I did actually realise what I had done wrong about 1
minute after posted the message.

Thanks, though!!!

BTW, what does MVP stand for?

Dan.



-----Original Message-----
Hi Dan,

Your current reference is to a method or property of the subform control
(not the form which is viewed through the subform control). The public
procedure belongs to the subform control's form - just change the
reference to this:

sfrmAssociatedContacts.form.SetTabs


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
I have a form that shows contact details. This form also
has a sub form which shows lists of other contacts that
are associated with the current contact. The object name
for the sub form is sfrmAssociatedContacts and is bound to
the [Associated Contacts] form.

The [Associated Contacts] form has several tabs, but I
only want to show the tabs that are relevant to the
current contact record in the main form. That is, I may
want to hide or show other tabs depending on values of the
current contact record.

I thought I could add a public method in the [Associated
Contacts] form module called SetTabs and then call it in
the main form's Form_Current() event routine, as follows:

sfrmAssociatedContacts.SetTabs

However, the routine is not recoginised as being part of
the sfrmAssociatedContacts object.

Can someone advise me how best to implement what I need?

Thanks,

Dan.

.
 
Back
Top