Designing a Form using VBA code ONLY

B

BonesDT

I want to create a simple form using VBA code ONLY.

I have a lot of experience with VBA code in MS Word and want to advance it to
Access. I have searched all over the internet and read books, but everything
just shows you how to do $*%# using queries, non-VBA macros, expressions,
control sources, row sources, record sources, blablabla, etc. I don't know
how you can keep track of a complicated program with hidden code strewn all
over the place.

The simple form I want to start with would have a combo box at the top that
would be populated with the "Name" field from Table1. I'm thinking this
could be done using ADO in the Form_Initialize or Load subroutine.

After a record is selected, text boxes will fill in the information from the
other fields of the record. The fields will come from a few tables linked by
"Id". I'm thinking this could be done in a cboName_AfterUpdate sub.

Everything needs to be read only, I don't want the tables accidentally
editted.

Can someone get me started?
 
M

Mike Painter

BonesDT said:
I want to create a simple form using VBA code ONLY.

I have a lot of experience with VBA code in MS Word and want to
advance it to Access. I have searched all over the internet and read
books, but everything just shows you how to do $*%# using queries,
non-VBA macros, expressions, control sources, row sources, record
sources, blablabla, etc. I don't know how you can keep track of a
complicated program with hidden code strewn all over the place.

The same argument for any language can be made down to a machine level
language.

As soon as you say Print "Hello World" or InPut "Enter your name" you are
depending on a *lot* of code.

If you want to roll your own you will be a lot happier with VB, or C. They
allow much more control at the expense of MUCH more work.

You can do most of what you want in Access with just VBA and a blank form
but it will be a ton of busy work, be much harder to control, and, if you
are good, probably take ten times longer.
Can someone get me started?

Open a blank form, add text boxes.
Read about Formatting, Data, Events for the forms and text boxes.

Or you could could use InputBox a lot.
 

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