copy field data

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

Guest

Is there a way to set a field to copy the information from one field to another and still allow a user to change the new field without disturbing the original field? I know I can use =[field name] in the second field, however when I try to make a change to the new field I receive the message "Control can't be edited; it's bound to the expression '[field name]

Example
Original amount $2000
New amount $2000 - inserted automaticall
at a later date, the user wished to change the New amount to $100
 
Dan,

You would have to have a separate field in your table for NewAmount, and
have this bound to the control on your form.

On the AfterUpdate event of OriginalAmount, you could put code like this...

If Not IsNull(Me.OriginalAmount) Then
Me.NewAmount = Me.OriginalAmount
End If

Then, the user can edit the NewAmount value if they want.
 
Thanks Steve,
We're almost there. I'm able to change my NewAmount field however a couple things happen
1. I receive the following error message: The expression After Update you entered as the event property setting producced the following error: Procedure declaration does not match description of event or procedure having the same name. My only option is to click OK, when I do, the change is made
and
2. The orginal amount changes as well and I don't want it to

Da
 
Dan,

I see no reason for the OriginalAmount to change when the NewAmount is
edited. They are bound to different fields in the table, right? And
there is no code running on the NewAmount control, right?
 
Steve thanks for your patience

I’ve messed with this so much my head is swimming: I’m back to square 1, I can’t get the new field to populate with the Original amoun

Private Sub Adjusted_Lien_Amount_AfterUpdate(
If Not IsNull(Me.Original_Lien) The
[updated lien amount] = Me.Original_Lie
End I

End Su

Original Lien - the original amoun
Adjusted_Lien_Amount - the field I want to be show as Original until change
Updated Lien Amount – the new fiel


Dan - nearly bald from pulling my hair out
 
Dan,

I have obviously missed the point, and I am still missing it! Why do you
want 3 fields? All I have said so far was based on an assumption of 2
fields, being Original Lien and Updated Lien Amount, and on the
assumption that you wanted Updated Lien Amount to be the same as
Original Lien, unless somebody changes it. In this case, the code would
read...
Private Sub Original_Lien_AfterUpdate()
If Not IsNull(Me.Original_Lien) Then
Me.Updated_Lien_Amount = Me.Original_Lien
End If
End Sub

Where have I gone wrong?
 
Back
Top