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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LinkChildFields/LinkMasterFields - using two

Status
Not open for further replies.

sumoalex

Programmer
Jan 27, 2003
56
CA
Hi all:
This works:
subfrmFindWorkRecord.LinkChildFields = "EmployeeID"
subfrmFindWorkRecord.LinkMasterFields = "EmployeeID"

This doesn't:
subfrmFindWorkRecord.LinkChildFields = "EmployeeID;ApprovalEffectiveDate"
subfrmFindWorkRecord.LinkMasterFields = "EmployeeID;ApprovalEffectiveDate"

Everything I've checked says if you want to use more than one field, separate fields with semi-colons, but I get the following error message:

"You must use the same number of fields when you set the LinkChildFields and LinkMasterFields properties.

You entered a different number of fields for one property than you did for the other..."

What's up with this?
 
Try doing it without including the double quotes. For example,

subfrmFindWorkRecord.LinkChildFields = EmployeeID;ApprovalEffectiveDate
subfrmFindWorkRecord.LinkMasterFields = EmployeeID;ApprovalEffectiveDate
 
Stupid question ... Do you have 2 fields on your subform named EmployeeID and ApprovalEffectiveDate? And do you have 2 fields on your main form named EmployeeID and ApprovalEffectiveDate?
 
LOL yes (that was my original mistake) but yes I do.
 
You got this fixed yet? - I had the same problem and worked around it by setting both my link fields to an empty string before passing new values:

subfrmFindWorkRecord.LinkChildFields = ""
subfrmFindWorkRecord.LinkMasterFields = ""

subfrmFindWorkRecord.LinkChildFields = "EmployeeID;ApprovalEffectiveDate"
subfrmFindWorkRecord.LinkMasterFields = "EmployeeID;ApprovalEffectiveDate"

Cheers
Shannon


[yinyang]
 
I had the same error, and I fixed it by simply adding a second Master and Child-link in design mode on the subreport.

The error was gone, and I'm a happy man :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top