Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    LinkChild & Master Fields (2000)

    I have data entry form with a blank sub form. The source object is dependant on the data entered. I can't get the LinkChild Fields and LinkMasterFields statements to work. I need to link on 2 fields - CRN & EndoDate and have tried FrmSub.LinkChildFields = "CRN ; EndoDate" or with a comma and all permutations I could think of - what is the correct syntax?
    Thanks
    Allison

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: LinkChild & Master Fields (2000)

    Make sure that you use the name of the subform as a control on the main form. This is not necessarily the same as the name of the subform in the database window. To check the control name, open the main form in design view and click once on the subform. (If you click on it a second time, you'll select something in the subform.) The control name will be displayed in the Object dropdown on the Formatting toolbar, and in the title bar of the Properties window.
    The syntax using a semicolon is correct.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: LinkChild & Master Fields (2000)

    One other point: if Link Child Fields and Link Master Fields are currently set to a single field, you have a problem if you want to want to set them to two fields. Access will not allow you to set one of the properties to two fields while the other one is still set to one field. The workaround is to clear both properties first, then set the new values:
    <code>
    Me.<subformname>.LinkChildFields = ""
    Me.<subformname>.LinkMasterFields = ""
    Me.<subformname>.LinkChildFields = "CRN;EndoDate"
    Me.<subformname>.LinkMasterFields = "CRN;EndoDate"
    </code>
    where <subformname> is the name of the subform as a control on the main form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •