S
sara
I am new to VBA and forms. I could use some direction
here, if possible - sort of an outline of what I should be
doing, I think.
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 (I have been trying "On Double Click" Event),
and open up a new form to edit this one record. I have to
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 - and the order to write
it - 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.
I have thought about being able to write the record to
save to a new table (Make Table Query), then append it to
the original table, and save the new record. But I can't
even get the chosen record to show up on the Form to Edit
when I double-click.
Thans so much. I am learning, and just need some
guidance - what events, what commands, rather than
detailed code. Then I'll try to figure the code out
myself.
Sara
..
here, if possible - sort of an outline of what I should be
doing, I think.
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 (I have been trying "On Double Click" Event),
and open up a new form to edit this one record. I have to
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 - and the order to write
it - 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.
I have thought about being able to write the record to
save to a new table (Make Table Query), then append it to
the original table, and save the new record. But I can't
even get the chosen record to show up on the Form to Edit
when I double-click.
Thans so much. I am learning, and just need some
guidance - what events, what commands, rather than
detailed code. Then I'll try to figure the code out
myself.
Sara
..