MICROSOFT ACCESS: THE MINDSET OF THE VBA PROGRAMMER - PowerPoint PPT Presentation

About This Presentation
Title:

MICROSOFT ACCESS: THE MINDSET OF THE VBA PROGRAMMER

Description:

From my new VBA book due out soon, here’s an extract about the mindset of the Microsoft Access database VBA programmer… – PowerPoint PPT presentation

Number of Views:90

less

Transcript and Presenter's Notes

Title: MICROSOFT ACCESS: THE MINDSET OF THE VBA PROGRAMMER


1
MICROSOFT ACCESS THE MINDSET OF THE VBA
PROGRAMMER
2
Microsoft Access Database The mindset of the
VBA programmer From my new VBA book due out
soon, heres an extract about the mindset of
the Microsoft Access database VBA programmer We
need to start by establishing a frame of
reference as to what we should expect when we are
writing VBA code. Consider the scenario where
you command a child to open the door. Think
about all the individual actions that it takes to
accomplish that one statement. The child has to
approach the door, align the hand with the door
knob, move the hand and grasp it around the door
knob, and then twist and pull the door knob while
swinging the arm in an arc motion. We dont have
to command each specific step, and indeed life
would be very tedious if we constantly had to
issue commands at such a micro level of detail.
However, somewhere along the line, the child had
to learn what it meant and all the steps in the
process to open a door. The child didnt have to
be told for each step and probably figured it out
by observing others and by bumping into
themselves a few times.
3
When working on a computer, it is helpful to
remember that computers have to be instructed,
basically shown the way on how you want it to do
things. Be clear, the first thing to remember
about computers is that they cant do what you
didnt tell them to do. Therefore, to ask the
computer to open the door is meaningless until
you actually define the exact steps required to
accomplish the task. You cant rely on the
computer to observe and understand the act of
opening the door as a child would. Fortunately,
you can build upon the work done by other
programmers. So, for example, when you want to
display a little message box saying, Hello,
World! you can use a single line of code or
instructions as shown below. This combines
programming done by others with something you
want said. MsgBox Hello, World! Behind the
scenes, the instruction (command) MsgBox goes
through several steps it instructs the computer
how to draw the box, how to position it, what
button to put on it, and how to style it.
4
All of those details are abstracted away from us,
which makes our task so much easier. Knowing that
the computer needs every step to be defined, you
can appreciate the benefit of being able to
leverage existing programming and commands to
write your own code. But its still upon you to
supply the missing pieces, like the actual
message Hello, World! Remembering the general
rule that it cant do what you didnt tell it to
do is invaluable in programming.
When writing code, you are working with a type of
program called a compiler, which is responsible
for translating the VBA language into machine
language that the computer can understand and
execute. As you write code, the compiler provides
feedback on whether statements are valid and free
of syntax errors (structural errors). When
discussing how the computer will react, we will
often refer to the compiler or VBA Editor. Keep
an eye out for the release of my new
book Microsoft Access VBA Programming soon
5
Contact us
Ben Beitler
ben_at_accessdatabasetutorial.com
(44) 7881
502400
United Kingdom
London
https//www.accessdatabasetutorial.com/
Write a Comment
User Comments (0)
About PowerShow.com