Microsoft Office Tutorials and References
In Depth Information
Essential Database Concepts
Modules for writing your own programs
Okay, now we come to the serious programming stuff: modules, which is
another term for Visual Basic programs. Visual Basic for Applications (VBA)
is a programming language based on the age-old BASIC language; it’s
specifically geared toward Access and other Office programs. Macros are fine for
saving a few keystrokes or cleaning up the data you enter in a field, but when
the going gets complex, use VBA.
Book I
Chapter 1
Programming isn’t for the technologically faint of heart, and fortunately, it’s
rarely necessary. But when everything else is done in your database, take a
look at Book VIII for an introduction to VBA programming. Writing small
programs isn’t all that hard — and if you acquire a taste for programming,
who knows what you’ll end up creating?
Essential Database Concepts
Here are the Five Commandments of Databases. (Aren’t you relieved that
there aren’t ten?) You’ll find lots more important rules and guidelines
throughout this topic as you discover how to work with various Access
objects, but these five rules apply right from the start, no matter what kind
of database you’re using:
Store information where it belongs, not where it appears. Where you
store information has nothing to do with where it appears. In a
spreadsheet, you type information where you want it to appear when you print
the spreadsheet, but databases work differently. In a database, you store
information in tables based on the structure of the information. (Don’t
worry — Chapter 3 of this minibook explains how to figure out the
structure of your data.) Each piece of information likely appears in lots of
reports. In a database for an online bookstore, for example, book titles
and author names appear on your invoices, purchase orders, and
sales receipts. But the right place to store those book titles and author
names probably is the Books table, not the Sales table or the Purchase
Orders table.
Store information as it really exists, not as you want it to appear in
a specific report. This rule is a corollary to the first rule. If you want
book titles to appear in all uppercase (capital) letters in your purchase
orders, Access can capitalize the titles for you. Store the book titles with
correct capitalization so you aren’t stuck with them in all caps on every
report. Access has built-in formatting options that control the way that
text, numbers, and dates are formatted, as described in Book II, Chapter 1.
Functions are also available for more advanced formatting, as you learn
in Book III, Chapter 2.
Avoid garbage in, garbage out (GIGO). If you don’t bother to create
a good, sensible design for your database — and if you aren’t careful
about entering correct, clean data — your database will end up full of
Search JabSto ::




Custom Search