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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy calculated field

Status
Not open for further replies.

Zorro1265

Technical User
Nov 14, 2000
181
US
I am using access 2000 and I have an unbound calculated feild that I want to copy into a table.

I have created a bound textbox to the table and feild the data should reside in. I have tried the following code on the after update event.

Me!WMS = Me!Text3

Text3 is the calculated feild and wms is the bound text box. I would swear I have done this before and it worked but now I can't get it to do a thing. What am I forgetting? Zorro
 
Ok I tried this

Me!WMS.Value = Me!Text3.Value

Still no joy. I am storing this since I don't need the data to change in the future and will actually want to compare it easily to more calculated data later. Zorro
 
Ahh. I think your text guy needs to be UNBOUND. In the after-update or exit event for it, simply use

me!WMS = me!Text3.VALUE

This is assuming that WMS is a field in your form's recordsource.

If this still isn't working, are you getting an error message, or is it just that the data doesn't appear to be being stored there?

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Well I used me!WMS = me!Text3.VALUE in the after update, I made wms unbound and still nothing. No error but nothing happens when I modify the info in the calc feild. Zorro
 
Hmm this is funny.

I made a new form set it up the same way but now text3 is not calculated from other things on the form. If I do this the code works. As soon as I make it a calc feild it won't work after update or on change. If I put the code on the WMS field to run when it gets focus things work fine. My only problem is no one will ever clik WMS for it to get focus!! Zorro
 
I have been searching the forums and according to what I have been reading it appears that calcultated fields do not activate the normal events when they are changed. I test this by making a calc field that is the result of 2 text boxes dividing box 1 by box 2 and when I change the values the calc field will not fire off the change or after update events. I assume this is a bug in Access. Zorro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top