Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically Linking/Unlinking a Subform

Status
Not open for further replies.

jaaret

Instructor
Jun 19, 2002
171
0
0
I have a subform linked to a main form by AuthorID. I am attempting to unlink the form when I populate a search field. The first part of this If statement works but the Else part fails. I've tried LinkMasterFields = Null.

If IsNull(Me.txtQuoteSearch) Then
Form_frmFormName.fsubQuotes.LinkMasterFields = "txtAuthorID"
Else
Form_frmFormName.fsubQuotes.LinkMasterFields = ""
End If

Me.fsubQuotes.Requery

What am I missing?

Thanks in advance,
Jaaret
 
LinkMasterFields = "" is the correct notation.
If you are working from frmFormName then I would use the me notation and not the reference of the form object.
me.fSubQuotes.
not
Form_frmFormName.fSubQuotes

I would think the latter would work, but there is a slight difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top