How do I Unset LinkChildFileds & LinkMasterFields?

S

Stapes

Hi

I use the following code to filter for a particular Order number:

Text22 = Me.Combo16
[Order Details].LinkMasterFields = "Text22"
[Order Details].LinkChildFields = "PK_Order"

Elsewhere I have a button 'View All', trying to cancel the above
filter. This code don't work:

Forms![Order Form].Form![Order Details].Form.LinkChildFields =
Null
Forms![Order Form].Form![Order Details].Form.LinkMasterFields =
Null

I get Application or Object defined error.

Is there a way to do this?

Stapes
 
R

Rick Brandt

Stapes said:
Hi

I use the following code to filter for a particular Order number:

Text22 = Me.Combo16
[Order Details].LinkMasterFields = "Text22"
[Order Details].LinkChildFields = "PK_Order"

Elsewhere I have a button 'View All', trying to cancel the above
filter. This code don't work:

Forms![Order Form].Form![Order Details].Form.LinkChildFields =
Null
Forms![Order Form].Form![Order Details].Form.LinkMasterFields =
Null

I get Application or Object defined error.

Is there a way to do this?

Stapes

Try "" instead of Null.
 
S

Stapes

Stapes said:
I use the following code to filter for a particular Order number:
   Text22 = Me.Combo16
   [Order Details].LinkMasterFields = "Text22"
   [Order Details].LinkChildFields = "PK_Order"
Elsewhere I have a button 'View All', trying to cancel the above
filter. This code don't work:
   Forms![Order Form].Form![Order Details].Form.LinkChildFields =
Null
   Forms![Order Form].Form![Order Details].Form.LinkMasterFields =
Null
I get Application or Object defined error.
Is there a way to do this?

Try "" instead of Null.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com- Hide quoted text -

- Show quoted text -

That gives the same error.
 
R

Rick Brandt

Stapes said:
That gives the same error.

Missed this before. Subforms do not have MasterLink and ChildLink
properties. The Subform *Control* that they are hosted in are where the
properties exist. In the following...

Forms![Order Form].Form![Order Details] .Form .LinkChildFields = Null

....the ".Form" I spaced out is specifying the form inside the subform
control. You want to change the property of the control itself so just take
that part out.
 
L

Larry Linson

Rick Brandt said:
Missed this before. Subforms do not have MasterLink and ChildLink
properties. The Subform *Control* that they are hosted in are where the
properties exist. In the following...

Help me understand, Rick... as far as I know, there is no Subform object in
Access; only a Subform Control. Keeping this (my standard admonition on the
subject) in mind might have saved some work / hassle. :)
Are you talking about a Form embedded in a Subform Control? :)

Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top