Link to home
Start Free TrialLog in
Avatar of Issa S.
Issa S.

asked on

What is the VB code to run a Macro after some event on a Text in a Form, say After Update.

Hi All,,

What is the VB code to run a Macro after some event on a Text in a Form, say After Update.
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Issa S.
Issa S.

ASKER

Jim:  

Thanks for straight forward answer.  

Pat:
You are hitting on the heart of my problem.

I do not like to use the Code Builder for this. But since I do have some code built on the same textbox on the AfterUpdate event, I can not find a way of how to use the Macro Builder and the Code Builder at the same time! Otherwise, my job would have been much simpler.

So do you have any suggestion of how to skip the VB Code and stay with the Macro actions instead or both?

That is the puzzle for me at the moment, especially am poor on VB.
Avatar of Issa S.

ASKER

Thanks a lot.
Very helpful.
If you want to run a macro in an event, build the macro and test it first, then instead of clicking the code option for the event, pick the macro option or just run the macro inside the event code.

The most important thing is to choose the correct event.  Running VBA or a macro in the wrong event will not meet your objectives no matter what the code does.

Get yourself the Access Cookbook written by Ken Getz, Paul Litwin, and Andy Baron and published by O'Reilly.  The second edition is the newest version.  The Access GUI has changed substantially since the book was written but VBA has changed very little.  The book offers well written examples of how to do "stuff".  It is an excellent tool if you can learn by example.

Believe it or not, VBA is logically easier to write than macros  Do not be afraid of it.