1 / 5

MICROSOFT ACCESS THE MINDSET OF THE VBA PROGRAMMER(1)

MICROSOFT ACCESS THE MINDSET OF THE VBA PROGRAMMER(1)

Télécharger la présentation

MICROSOFT ACCESS THE MINDSET OF THE VBA PROGRAMMER(1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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, here’s 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 don’t 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 didn’t 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 can’t do what you didn’t 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 can’t 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 it’s still upon you to supply the missing pieces, like the actual message “Hello, World!” Remembering the general rule that it can’t do what you didn’t 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@accessdatabasetutorial.com (+44) 7881 502400 United Kingdom London https://www.accessdatabasetutorial.com/

More Related