Updating from one field to another (on the same table)

sd100

Registered User.
Local time
Today, 19:46
Joined
Apr 29, 2008
Messages
10
I need a control which will update one set of fields from another on the same form - It's a valuation page with fields for the current value and previous. Obviously after a year current will become previous and a new value added to current. So I need to be able to hit a button which will copy value a into value b field, leaving me able to then update a.

I've tried an update query - which worked in isolation but I can't then use the result in calculations (for growth etc) as I need to combine it with the query it was based on. Ideally I'd like the two fields a & b in the same table with a query that will update b - only when the button is pressed.

Any suggestions?

Thanks
 
if both of the controls on the form that represent the fields are bound to the table columns, all you need to do for the button is change the value of the first control:
Code:
on click

  me.fieldA = me.fieldB
    me.fieldB = NULL
 
Thanks

You are a superstar!
 

Users who are viewing this thread

Back
Top Bottom