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.
James CoatsComputer Info. Sys. StudentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
James CoatsComputer Info. Sys. StudentAuthor Commented:
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.
Gustav BrockCIOCommented:
This one is working, sort of, as I'm not quite sure what you wish to accomplish.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James CoatsComputer Info. Sys. StudentAuthor Commented:
Thank you that is exactly what I wanted to see. Now I can work on the other code with this as an example.
Gustav BrockCIOCommented:
You are welcome!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.