I'm using the following scheme to track how unique widgets come in and go out.
The receipt form is related to its widget subform through m.id = w.from_movement_id and the shipment form through m.id = w.to_movement_id.
The receipt_widget subform works well for adding widget entries that are received for the first time, but the shipment_widget subform doesn't precisely because it insists on adding new entries even though it is not supposed to do so. How can I configure figure the shipment_widget subform to have the user chooses existing widgets.
As of now, the shipment_widget shows "New" in the id field of its first blank row. As soon as one clicks on it, the id turns into the next autonumber. If I then proceed to choose an existing widget from from a combobox bound to w.id or even try to edit the id field directly, Access doesn't let me do so. If I disallow new entries in the subform, then I can't do anything with it at all.
I have an idea how to do this using the combobox's before update event and requery, but I wonder if there's a simpler way. Thank you.
Code:
Movement (m)
----------
- id (pk)
- move_on
- origin_id
- destination_id
Widget (w)
--------
- id (pk)
- model_id
- serial_number
- from_movement_id (fk)
- to_movement_id (fk)
The receipt form is related to its widget subform through m.id = w.from_movement_id and the shipment form through m.id = w.to_movement_id.
The receipt_widget subform works well for adding widget entries that are received for the first time, but the shipment_widget subform doesn't precisely because it insists on adding new entries even though it is not supposed to do so. How can I configure figure the shipment_widget subform to have the user chooses existing widgets.
As of now, the shipment_widget shows "New" in the id field of its first blank row. As soon as one clicks on it, the id turns into the next autonumber. If I then proceed to choose an existing widget from from a combobox bound to w.id or even try to edit the id field directly, Access doesn't let me do so. If I disallow new entries in the subform, then I can't do anything with it at all.
I have an idea how to do this using the combobox's before update event and requery, but I wonder if there's a simpler way. Thank you.