Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Help with subform relationship! (Access 2000 >)

    Hi all,
    I am running in ever wider circles with this DB. I can't seem to get a sub forms field to relate to the main form. I have tried and tried...........but seem to run into problem after problem. The relationships seem to be in order. I am suspection that its a Master/Child relationship issue. Please help; I'm running out of things to try!!!!

    If you open the DB, open up the JOBLIST FORM. If you add a record, (simply put in some data from the dropdowns) into the main form. The moment you click in the subform it complains about relationship issues on the Master / Child...

    Please assist me to solve this......many many thanx!
    Regards,
    Rudi

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

    Re: Help with subform relationship! (Access 2000 >)

    Among many other things, the main problem is the record source of the main form: JobList_Query is a query based on 3 tables with a one-to-one relationship. Creating a new record in this query will fail, because creating a new record in JobList will not automatically create new records with the same JobNumber in AssetInstalled and AssetRemoved. Since you have one-to-one relationships, why use three separate tables? Why not combine JobList, AssetInstalled and AssetRemoved into one table?
    Or was it not your intention to have one-to-one relationships, and did you actually want one-to-many relationships?

    Another problem is the record source of the subform, it should be the RemoveLocation table, not a query including other tables.

    Dare I mention Option Explicit once more?

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help with subform relationship! (Access 2000 >)

    Tx for the response Hans. I will make those changes and see if it works better.

    "Dare I mension that it is not my DB. I did not go into any modules to check the code! I've just been working on the front end! BUT, I am using it in ALL my coding as a habit now....but reminders are good anyway!" <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Regards,
    Rudi

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help with subform relationship! (Access 2000 >)

    Hans, tx!
    It works very well. I merged the three tables to eliminate the 1 to 1 joins and simply had a 1 to many join between the new merged table and Location Removed table. The form and subform work well together now!
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Regards,
    Rudi

Posting Permissions

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