Hello:
Here's my problem:
I have a form/sub-form with two table links, one to Names (the master form) and one to Addresses (sub-form).
I have an "editing mode" button which allows edits and additions to the field data in the sub form, like so:
in On_Click event code for EDIT MODE button:
Me.AllowEdits = True
Me.AllowAdditions = True
Here's my problem - when I go and edit an EXISTING address and then SAVE it, everything works OK.
I'm using a simple button with a save function created automatically by the button wizard in the forms Design View.
But if I go back to Viewing MODE (similar button), which basically sets these two values to FALSE, everything works OK up to that point.
But if I RETURN or go back to EDIT MODE to change the SAME record, then all of my normally editable fields in the sub form are blanked out, and non-editable, as if they are no longer enabled, though I am not setting those properties via code.
Obviously I'm missing out on something here. Is there something more I need to do to save correctly?
Tried using Me.Refresh and the problem still crops up.
Maybe I need to include DataEntry = True/False as well?
Maybe I need to tie edits to the master/source form/table
more strictly in order to prevent this problem?
The weird thing is, closing and re-opening the form from scratch works fine too, so it must be a fairly minor item I'm missing.
Any suggestions or ideas?
Thanks.
marcus101
marcus101
Access/SQL/XML Developer
Ottawa, Canada
Here's my problem:
I have a form/sub-form with two table links, one to Names (the master form) and one to Addresses (sub-form).
I have an "editing mode" button which allows edits and additions to the field data in the sub form, like so:
in On_Click event code for EDIT MODE button:
Me.AllowEdits = True
Me.AllowAdditions = True
Here's my problem - when I go and edit an EXISTING address and then SAVE it, everything works OK.
I'm using a simple button with a save function created automatically by the button wizard in the forms Design View.
But if I go back to Viewing MODE (similar button), which basically sets these two values to FALSE, everything works OK up to that point.
But if I RETURN or go back to EDIT MODE to change the SAME record, then all of my normally editable fields in the sub form are blanked out, and non-editable, as if they are no longer enabled, though I am not setting those properties via code.
Obviously I'm missing out on something here. Is there something more I need to do to save correctly?
Tried using Me.Refresh and the problem still crops up.
Maybe I need to include DataEntry = True/False as well?
Maybe I need to tie edits to the master/source form/table
more strictly in order to prevent this problem?
The weird thing is, closing and re-opening the form from scratch works fine too, so it must be a fairly minor item I'm missing.
Any suggestions or ideas?
Thanks.
marcus101
marcus101
Access/SQL/XML Developer
Ottawa, Canada