Issues with forms and subforms

U

UncleOli

Microsoft Access 2003

I have an "Edit record" button on a subform (as for detail line items in an
invoice for a particular customer) to enable allowedits when it is clicked.
How do I disable allowedits when moving to a new set of records (as for a new
customer being selected in the main form), so that the user needs to click on
the "Edit record" button again to make changes to the detail records.
 
A

AccessTaxMan

For the main form OnEnter property, create an event procedure to set your sub
form AllowEdits property to False.
 
U

UncleOli

The main form itself does not have an OnEnter property. Do you mean that I
should use an OnEnter property for one of the controls on the main form?
Also, how do I refer to the subform in the context of the main form?

Thank you.
02.06.06 10.06 hst
 
A

AccessTaxMan

I stand corrected. Try using the OnCurrent, or OnFocus event of the main
form to set your subform AllowEdits property to False.

You stated your subform displays records related to choices made on your
main form, but does not allow edits until the command button is clicked. I
assumed that your subform AllowEdits property was set to No when information
is first displayed. After making edits, and the user moves back to the main
form to make another selection, you seem to need an event procedure to
recreate this condition.
 
U

UncleOli

Sorry for not responding earlier. Thanks for your help.

Oli
04.06.06 16.55 hst
 
Top