creating duplicate record to be edited

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to add a new record to my tblForm1 by selecting an existing record
(from tblForm1) and populating my data entry form. At least 1 field in the
new record will change.

Data is added to tblForm1 using the data entry form Form1Add. tblForm1 data
is edited using Form1Edit.

I created a new form, Form1Followup and added a data entry subform
Form1FollowupSubform (a copy of Form1Add) that I need to populate with data
from the record I'm copying.

Form1FollowupSubform is a multipage/tabbed form (as are Form1Add and
Form1Edit).

I can scroll through the data using Form1Followup and the first field (my
record ID) changes. None of the other data appears.

I'm looking for help on filling the subform with the data.

Thanks,

Sally
 
Hi,


I don't follow the logic of the subform, if only one record is involved: I
would put a default on each CONTROL (not column, of the table, but each
control, on the form) and add a new record from the Form.

To modify the default value of a control, someone can add the line of code
similar to the following ones, in the After Update event subroutine handler
of the form:

Me.ControlName.DefaultValue = """" & Me.ControlName.Value & """"


Adding a new record, will then propose the values of the actual record that
has just been saved, to the new record which can be edited to modify one or
more controls before saving it.


Hoping it may help,
Vanderghast, Access MVP
 
Thanks Michael.

I'm not sure I was clear about my goal: copy information from the original
table (tblForm1) to the data entry form in order to populate the new record
with existing information, some of which can be edited.

I don't want the person who will perform the task to have to copy the record
in datasheet view. I would have her select the old record whose data would
populate the data entry subform (add only). In data entry mode, I've been
unable to populate more than the first field, which is an index field,
duplicates allowed.

Sally


--
Wizard Associates
Burlington, MA 01803
781-365-1115


Michel Walsh said:
Hi,


I don't follow the logic of the subform, if only one record is involved: I
would put a default on each CONTROL (not column, of the table, but each
control, on the form) and add a new record from the Form.

To modify the default value of a control, someone can add the line of code
similar to the following ones, in the After Update event subroutine handler
of the form:

Me.ControlName.DefaultValue = """" & Me.ControlName.Value & """"


Adding a new record, will then propose the values of the actual record that
has just been saved, to the new record which can be edited to modify one or
more controls before saving it.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top