Link to home
Start Free TrialLog in
Avatar of James Coats
James CoatsFlag for United States of America

asked on

Access VBA + Forms

I am learning how to read code and then attach a form. I am having problems. If someone could give an example by connecting the one form I am working to its code I could use it as an example for the rest of the code in the file.

Thank you in advance.
240Unit3PT21.accdb
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I'm not sure what you mean. You don't really "connect" a form to code. Instead, you use events and such on a form to run your code.

Your command button, for example, runs a block of code when it's clicked. That command button has other "events" you could use as well (although the Click event is by far the most commonly used).

Textboxes have Events - for example, a Change or AfterUpdate event might fire when the user edits data in that textbox.

The Form itself also has events - the BeforeUpdate and AfterUpdate events, for example. Those are fired when a user modifies data in some manner.

So you'll need to explain further what you need help with, and we'll see what we can do.
Avatar of James Coats

ASKER

I am new to this sorry for the confusion of my question. I would like to see a working form using it's click event to include the text box click events so I can see how it works.

I have been trying to build one for some of the code in the Access file you have but have consistently failed. If I could look a one that was working I feel I could better understand what is going on and how to build them. I could then work on the other code examples for practice.
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark 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
Thank you that is exactly what I wanted to see. Now I can work on the other code with this as an example.
You are welcome!

/gustav