S
sara
I am new to VBA and forms. I could use some direction
here, if possible.
I have a form and subform. Enter Employee Number and see
all the charge records for that employee. The records
come into us from an outside source. I have a field on
the record "Ignore" which defaults to "NO". If I have to
correct a value on the record, I first change "NO"
to "YES" (so my queries can ignore the 'wrong' record, but
so I don't lose it - in case there's an error somewhere),
and save the original record with "YES", and then change
the value(s) as needed, and save it with Ignore = NO.
I would like the user to choose the record to change from
the sub-form, and be able to save the original record with
Ignore changed to "YES" and the record with the user's
changes with Ignore "No".
I don't know what code to write - I'm not asking for all
the code, just what to do. On what event(s) do I attach
code? What commands do I use? I can do the
DoCmd.DoMenuItem SaveRecord for the change, but I don't
know what code to add - and where to add it - to save the
original record. I also have an "Undo" button, and I want
to make sure it "Undoes" both the new changes and deletes
the record I added for Ignore = Yes.
Thans so much. I am learning, and just need some
guidance - what events, what commands, rather than
detailed code.
Sara
here, if possible.
I have a form and subform. Enter Employee Number and see
all the charge records for that employee. The records
come into us from an outside source. I have a field on
the record "Ignore" which defaults to "NO". If I have to
correct a value on the record, I first change "NO"
to "YES" (so my queries can ignore the 'wrong' record, but
so I don't lose it - in case there's an error somewhere),
and save the original record with "YES", and then change
the value(s) as needed, and save it with Ignore = NO.
I would like the user to choose the record to change from
the sub-form, and be able to save the original record with
Ignore changed to "YES" and the record with the user's
changes with Ignore "No".
I don't know what code to write - I'm not asking for all
the code, just what to do. On what event(s) do I attach
code? What commands do I use? I can do the
DoCmd.DoMenuItem SaveRecord for the change, but I don't
know what code to add - and where to add it - to save the
original record. I also have an "Undo" button, and I want
to make sure it "Undoes" both the new changes and deletes
the record I added for Ignore = Yes.
Thans so much. I am learning, and just need some
guidance - what events, what commands, rather than
detailed code.
Sara