'Dirty primary key Number from multiple forms in Access
I have a scientific database that takes measurements from different forms all linked to the same entityID. My problem is that, while I have an autonumber ID for the main table just like an invoice structure, the sub sample forms can and should dirty the main ID. I want to increment the main id from any of the subforms when I enter the first measurement on any subform, but I don't want to increment the Main ID when I access one of the other child subforms and enter additional measurements for the current , and if the main id is dirty I don't want any of the 3 subforms to advance the autonumber EntityID, which means I can't seemingly use DMax on any subforms where new entries could be made. but once one of the child subforms is dirty I need to reference the main entityid once generated from the other child forms once dirtied. anyone?
|obsid auto pk|
|obsnum long pk| |number| main experiment number|***herein lies the DMax problem***
|meas1id| |number| -required
|obsnum| |number| fk -required
|meas1num| |number|
meas2id number not required
meas2num number
meas3id number not required
meas3num number
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
