Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically update field

Status
Not open for further replies.

sjmojeck

Technical User
Sep 6, 2001
24
US
Is there a way to have the contents of one field on a form be copied to another field on the same form?
 
sure, use the after update event of the first field to run code like this...

me.secondfield = me.firstfield

once you click out of the first field, it'll copy what ever is in the first field to the second...

--James JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
That is what I tried however the contents are not being updated. Any other suggestion?
 
Here is some additional information:
The field that I am trying to copy is an autonumber field. I would like the contents of the autonumber field copied to a number field on the same form.
Thanks
 
ahh... i see... so why not put that same code in the on open event of the form... an autonumber is (as far as i have seen) alwas there, when you create a new record, that is the first thing that happens, right along side of the default values being assigned... just an idea...

is that second field going to be stored in the table twice? or is it just there for information??

if it's just there for information, then make the field source for the second field
=me.firstfield or some thing like that... then it'll just display it...

--James
JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top