I would appreciate any help you could offer. I have a master table with a autonumber primary key called "PermitID". I have two other tables which also have a primary key of "PermitID" (long int), call them supplement1 and supplement2. The idea here is that the master table always exists, but there may be related information in Supplement1 on occasion. Likewise, if Supplement1 exists, there also be further information in Supplement2.
So the two supplement1 and supplement2 are linked to the master with a one-to-one relationship with referential integrity, all through the common "PermitID". On my data input form I have the info from the master table, and two tabbed pages where the supplemental information can be added, if applicable. The query uses two LEFT JOINs, so that I get all the Master records and any supplemental information. This part works fine. But data input is a disaster, and I have no idea why.
First I enter the Master data and it is auto-assigned [PermitID]=78. OK. Next I enter data for Supplement1 and likewise it is assigned [PermitID]=78. Still good. Now I enter Supplement2, and it is also assigned [PermitID]=78. GREAT. Well, not quite. Now I look back at [Supplement1].[PermitID] and it mystically has changed to a big fat zero. I know this because I display the [PermitID}s on the form just so I can peek. What am I missing? BTW, this is Access 2000. One other probably unimportant but interesting aspect is that if I enter Sup2, Sup1, then Master, it works fine. It also works if I enter Master, then Sup2, then Sup1 (which is really weird). Every way except the one I need, which is Master, Sup1, Sup2. Oh, and I could go change that goose-egg back to the correct [PermitID] too, but in pratice I wouldn't even want the [PermitID] fields to show on the form, and shouldn't this happen automatically anyway?
I also created a new database with 3 simple tables with [RecID] & [Masterdata], [RecID] & [Sup1], and [RecID] & [Sup2] fields respectively, where the non-key fields are just text for testing input. I linked these up, created the query and the form. Same result. Can you suggest what my problem might be (be nice)? Thanks heaps.
So the two supplement1 and supplement2 are linked to the master with a one-to-one relationship with referential integrity, all through the common "PermitID". On my data input form I have the info from the master table, and two tabbed pages where the supplemental information can be added, if applicable. The query uses two LEFT JOINs, so that I get all the Master records and any supplemental information. This part works fine. But data input is a disaster, and I have no idea why.
First I enter the Master data and it is auto-assigned [PermitID]=78. OK. Next I enter data for Supplement1 and likewise it is assigned [PermitID]=78. Still good. Now I enter Supplement2, and it is also assigned [PermitID]=78. GREAT. Well, not quite. Now I look back at [Supplement1].[PermitID] and it mystically has changed to a big fat zero. I know this because I display the [PermitID}s on the form just so I can peek. What am I missing? BTW, this is Access 2000. One other probably unimportant but interesting aspect is that if I enter Sup2, Sup1, then Master, it works fine. It also works if I enter Master, then Sup2, then Sup1 (which is really weird). Every way except the one I need, which is Master, Sup1, Sup2. Oh, and I could go change that goose-egg back to the correct [PermitID] too, but in pratice I wouldn't even want the [PermitID] fields to show on the form, and shouldn't this happen automatically anyway?
I also created a new database with 3 simple tables with [RecID] & [Masterdata], [RecID] & [Sup1], and [RecID] & [Sup2] fields respectively, where the non-key fields are just text for testing input. I linked these up, created the query and the form. Same result. Can you suggest what my problem might be (be nice)? Thanks heaps.