Passing a value from one event to another

  • Thread starter forcefield via AccessMonster.com
  • Start date
F

forcefield via AccessMonster.com

How do you pass a value of a field in one event to another.

For example fieldA= 30 before update event. After update event, I would
like to have another field, fieldB to have the same value as fieldA ie 30 .


How do write a simple code for this.

Any help is welcomed
 
M

Marshall Barton

forcefield said:
How do you pass a value of a field in one event to another.

For example fieldA= 30 before update event. After update event, I would
like to have another field, fieldB to have the same value as fieldA ie 30 .

The value will not change between the BeforeUpdate and the
AfterUpdate events so you can put the code in the
AfterUpdate event:
Me.fieldB = Me.fieldA

So, either your example is very weak or you should explain
more about you are trying to accomplish.
 
D

Daniel Pineault

If the controls (on a form they are controls not fields -- the control's
source is a field) are on the same form then you'd simply do something like

Me.ControlBName = Me.ControlAName
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top