C
Chipcom
Hi
I need to know how to stop acces from update the record when the
subform query is on focus?
Thanks
I need to know how to stop acces from update the record when the
subform query is on focus?
Thanks
Chipcom said:I need to know how to stop acces from update the record when the
subform query is on focus?
In
If you mean that you want to keep the main form's record from being
saved when the subform gets the focus, the only ways you can do that
are:
1. Have the main form be unbound. In that case your own code has to do
the job of reading the record, assigning its field values to the
controls on the form, detecting whether the values in the controls have
changed, assigning them back from the controls to the fields in the
record, and saving the record when you think it is appropriate.
2. Have the main form be bound, but keep all the controls unbound. Your
code has to navigate the form's recordset and assign values from the
recordset to the controls on the form, and then back again when you're
ready to save the record. Since the changes to the controls don't
affect the form's recordset directly, those changes won't be saved when
the focus goes to the subform, only after your code assigns the values
from the controls to the underlying fields and then you navigate the
form to another record, or close the form, or otherwise force a save.
Hi
Tell me please, is it possible to set the form to be unbounded and
after the update to set it with control source with VBA?
if this is not possible what is the shortest way to do that?
Can you please show an example with 2 fields of the shortest way?
Thanks- Hide quoted text -
- Show quoted text -
Chipcom said:Tell me please, is it possible to set the form to be unbounded and
after the update to set it with control source with VBA?
if this is not possible what is the shortest way to do that?
Can you please show an example with 2 fields of the shortest way?
Chipcom said:Any idea?
In
Sorry -- I've been too busy to look in the newsgroup.
I am talking about that when I focus on the sub form Access saves the
record.
You explained to me that there is two ways to save the record when the
user is want and I am talking about the Form's ControlSourcre :
Is there a way to unbound the Form with VBA and when the sub form is
on focus and access is trying to save the unbound form to assign the
table name to the ControlSource of the form?
In
If you mean that you want to keep the main form's record from being
saved when the subform gets the focus, the only ways you can do that
are:
1. Have the main form be unbound. In that case your own code has to do
the job of reading the record, assigning its field values to the
controls on the form, detecting whether the values in the controls have
changed, assigning them back from the controls to the fields in the
record, and saving the record when you think it is appropriate.
2. Have the main form be bound, but keep all the controls unbound. Your
code has to navigate the form's recordset and assign values from the
recordset to the controls on the form, and then back again when you're
ready to save the record. Since the changes to the controls don't
affect the form's recordset directly, those changes won't be saved when
the focus goes to the subform, only after your code assigns the values
from the controls to the underlying fields and then you navigate the
form to another record, or close the form, or otherwise force a save.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.