Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    348

    Unanswered: LinkMasterFields

    Hello all. I haven't been 'round much because I've been trying to educate myself a bit. I'm really stumped on this one. My books only mention it in passing. Most internet references say what I already have.

    I have a form Issues with a subform UpdateFrm which is the form Updates as it's content. I have the recordset for each pull on their respective open event. At the end of the open event for the parent form, Issues, I have the following:
    Code:
    Me.UpdateFrm.LinkMasterFields = "IssueID"
    Me.UpdateFrm.LinkChildFields = "IssueID"
    This appears to match the references I found on the web. IssueID is a fieldname in the recordset I pull for Updates and well as a control name in the form Issues. The issue may stem from the fact that IssueID exists in both forms and recordsets.

    The error I am getting is:
    vba run-time error'31':
    Data provider could not be initialized
    I was closing the recordset and connection at the end of the open events. I tried commenting this out but didn't find it helped. I'm sure there are plenty of other possible causes.

    Any suggestions?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I think the problem may lie in the naming. Remember; Computers are even less intelligent than users!

    Have you tried full naming? Generically: source.column (I think).
    EDIT: Just another thought - should it have quotes around it?
    George
    Home | Blog

  3. #3
    Join Date
    Feb 2007
    Posts
    348
    George,

    Thanks for the reply. I tried dropping the quotes, adding the table name, adding the table name and dropping the quotes and so on. I get different error but I keep getting errors. I started by focusing on the Masterlink.
    If I add the recordset name (no quotes), I get that "The method or data member is not found.
    The same with Quotes and I get that "The data provider can not be initialized" which is a problem I have run into a couple times that I don't totally understand.
    With Issues.IssueID I get "Object Required"
    If I add the quotes back in, I get the whole "Data object could not be initialized" thing again.
    If I use Forms!issues.issueid I get more of the "data object could not be initialized" with and without quotes.

    According to help, I should be able to call a control for the masterlink but not the child.

    So, it could be other issues that are more related to the "data object could not be initialized" that are masking my solution. It could be that I'm doing it totally wrong.

    Any more thoughts?

Posting Permissions

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