View Full Version : Editing data will create new record


simongallop
11-28-2000, 05:21 AM
I have a form that shows a client address fed directly from a table.

If the user changes the address how do I get the data to be treated as a new entry in the table as I do not want the existing record to be changed? The change will be confirmed by clicking a button so I need something for the OnClick event that will take the data to create a new record but leaving the original alone.

Thanks in advance

Simon



[This message has been edited by simongallop (edited 11-28-2000).]

S
11-28-2000, 06:43 AM
Using code you can store your data and add a new record.
AddressField.Locked = true 'user not allowed to modify field
On_DoubleClick event of AddressField:
Dim NewName as string, NewSurname as string
Dim NewAddr as string
NewName = [namefield]
NewSurname = [surnamefield]
...
NewAddr = inputbox("Digit new Address")
docmd.GoToRecord acDataForm,"Myform",acNewRec
[namefield] = NewName
AddressField = Newaddr