CrystalSurfer
Matrix activist
- Local time
- Yesterday, 17:23
- Joined
- Jan 11, 2006
- Messages
- 75
I have a number of sub forms managed by a tab control which is on my main Client form.
I can enter a new client and complete any of the subforms as required.
Most of these subforms are displaying 'child' tables to the main Client table. One of these has a 1-1 relationship with Client. (ie: an extension table, yes there is a good reason for this)
All good so far.
However, after completing the 'extension' subform if the Pagedown key is pressed (say accidentally) a new entry record is displayed on the subform. This is not good as I only want to allow 1 record for the Client on this particular subform.
Access 2003 does not stop me from entering data on this "new" record. It only tells me theres a problem when it attempts to save the record. Thats because I have set the foreign key on the extension table to be unique (no duplicates).
Is there anyway of trapping this or stopping a new record from being displayed on this subform?
I don't want to set 'Allow Additions' to No because I DO want to be able to add new clients through these forms.
Is it possible to check if displaying a new record and if so, then enable 'Allow Additions' on the subforms, having them set to No initially?
Thanks.
I can enter a new client and complete any of the subforms as required.
Most of these subforms are displaying 'child' tables to the main Client table. One of these has a 1-1 relationship with Client. (ie: an extension table, yes there is a good reason for this)
All good so far.
However, after completing the 'extension' subform if the Pagedown key is pressed (say accidentally) a new entry record is displayed on the subform. This is not good as I only want to allow 1 record for the Client on this particular subform.
Access 2003 does not stop me from entering data on this "new" record. It only tells me theres a problem when it attempts to save the record. Thats because I have set the foreign key on the extension table to be unique (no duplicates).
Is there anyway of trapping this or stopping a new record from being displayed on this subform?
I don't want to set 'Allow Additions' to No because I DO want to be able to add new clients through these forms.
Is it possible to check if displaying a new record and if so, then enable 'Allow Additions' on the subforms, having them set to No initially?
Thanks.