Form rowsource?

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a main form to display Organization type of information and subform
to display how many organization fall under this Org type. The form is
working fine. Now user want to go a little bit deeper, they want to have an
option to display only those organization who are directly invlove.

I have add a button hoping that user can click on it to switch the rowsource
of the form but it appear not working

If Me.cmdSwitchOrgSource.Caption = "List only Pact Partner" Then
Me.subfrmContactOrganizations.RowSource
="subfrmContactOrganizationsPartner"
Else
Me.subfrmContactOrganizations.RowSource = "subfrmContactOrganizations"
End If
Me.subfrmContactOrganizations.Requery

Could somebody advice?

SF
 
You can do that.

Try including the ".Form" bit, e.g.:
Me.subfrmContactOrganizations.Form.RowSource = ...

When you change the RowSource of a subform, it can mess up the
LinkMasterFields/LinkChildFields, so you might like to check if that
happens.

An alternative approach might be to apply a filter to the subform.
 
Am I missinging something here? What version of Access has a *RowSource* for
a form, instead of a *RecordSource?*

Allen said:
You can do that.

Try including the ".Form" bit, e.g.:
Me.subfrmContactOrganizations.Form.RowSource = ...

When you change the RowSource of a subform, it can mess up the
LinkMasterFields/LinkChildFields, so you might like to check if that
happens.

An alternative approach might be to apply a filter to the subform.
[quoted text clipped - 17 lines]

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
If Me.cmdSwitchOrgSource.Caption = "List only Pact Partner" Then
Me.subfrmContactOrganizations.RowSource
="subfrmContactOrganizationsPartner"

Don't you mean Recordsource (a query as the recordsource for a form) rather
than Rowsource? The latter applies to listboxes and combo boxes, not forms.

John W. Vinson [MVP]
 
Thank you. By changinf from Rowsource to RecordSource, it works now.
SF


missinglinq via AccessMonster.com said:
Am I missinging something here? What version of Access has a *RowSource*
for
a form, instead of a *RecordSource?*

Allen said:
You can do that.

Try including the ".Form" bit, e.g.:
Me.subfrmContactOrganizations.Form.RowSource = ...

When you change the RowSource of a subform, it can mess up the
LinkMasterFields/LinkChildFields, so you might like to check if that
happens.

An alternative approach might be to apply a filter to the subform.
[quoted text clipped - 17 lines]

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
Back
Top