IT SOLUTIONS
Your TECHNOLOGY partner! 
-Collapse +Expand
Access
Search Access Group:

Advanced
-Collapse +Expand Access Group Home
-Collapse +Expand Message Board
-Collapse +Expand Access KB
-Collapse +Expand Access To/From
To/FromCODEGuides
-Collapse +Expand Access Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Access Store
PRESTWOODSTORE
-Collapse +Expand Members Only

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► KB ►► Desktop Data...Access & VBA   All Groups  

Microsoft Access New and Updated KB Posts

Page Contents


Recently Created

(Microsoft Access Group)

  KB Article    

Mike Prestwood
1. Access VBA Array (x = Array())

Arrays in Access VBA use a 0-based indice. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

Posted to KB Topic: Access & VBA
38 months ago

Code
Nothing New Since Your Last Visit  
4065
Hits

Mike Prestwood
2. Access VBA Empty String Check (Len(s&vbNullString))

In Access VBA, you have to add an empty string to the value being compared in order to get consistent results. For example, add &"" to your string varilable or it's code equivalent &vbNullString. Then compare to an empty string or verify it's length to 0 with Len.

Posted to KB Topic: Access & VBA
44 months ago

Code
Nothing New Since Your Last Visit
5289
Hits

Mike Prestwood
3. Access VBA Self Keyword (Me)

Same as VB. The Me keyword is a built-in variable that refers to the class where the code is executing. For example, you can pass Me from one module to another.

Posted to KB Topic: Language Details
50 months ago

Code
Nothing New Since Your Last Visit
5387
Hits

Mike Prestwood
4. Access VBA Deployment Overview

You can deploy your Microsoft Access application either with the full version of Access or with the Access Runtime (see Deploying Applications Using the Access Runtime).

Posted to KB Topic: Language Basics
50 months ago

Code
Nothing New Since Your Last Visit
3064
Hits

Mike Prestwood
5. Access VBA Logical Operators (and, or, not)

Same as VB. Access VBA logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

Posted to KB Topic: Language Basics
51 months ago, and updated 44 months ago

Code

Article
Nothing New Since Your Last Visit  
8881
Hits

Mike Prestwood
6. Access VBA Interfaces

Same as in VB6. Access VBA has limited support for interfaces. You can create an interface of abstract methods and properties and then implement them in one or more descendant classes. It's a single level implementation though (you cannot inherit beyond that). The parent interface class is a pure abstract class (all methods and properites are abstract, you cannot implement any of them in the parent class).

In the single level descendant class, you have to implement all methods and properties and you cannot add any. Your first line of code is Implements InterfaceName.

Posted to KB Topic: OOP
52 months ago

Code
Nothing New Since Your Last Visit
4384
Hits

Mike Prestwood
7. Access VBA Destructor

When an object instance is destroyed, Access VBA calls a special parameter-less sub named Class_Terminate. For example, when the variable falls out of scope. Since you cannot specify parameters for this sub, you also cannot overload it.

When an object instance is created from a class, Access VBA calls a special sub called Class_Initialize.

Posted to KB Topic: OOP
52 months ago

Code
Nothing New Since Your Last Visit  
4863
Hits

Mike Prestwood
8. Access VBA Constructors (Class_Initialize)

When an object instance is created from a class, Access VBA calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.

When a class is destroyed, Access VBA calls a special sub called Class_Terminate.

Posted to KB Topic: OOP
52 months ago

Code
Nothing New Since Your Last Visit  
7091
Hits

Mike Prestwood
9. Watch Your Access Evaluations!

Execute more common evaluations first! Short-circuit evaluation is a feature of most languages where once an evaluation evaluates to False, the compiler evaluates the whole expression to False, exits and moves on to the next code execution line. In Access VBA, the if statement does not support short-circuit evaluation but you can mimic it. Use either an if..else if..else if statement or nested if statements. You will find that your code that makes use of this technique will be clearer and easier to maintain than the short-circuit equivalent and will execute faster than ignoring this issue.

Posted to KB Topic: Language Basics
53 months ago

Tip
Nothing New Since Your Last Visit
2341
Hits

Mike Prestwood
10. Access VBA Member Method (Sub, Function)

Access VBA uses the keywords sub and function. A sub does not return a value and a function does. Many programmers like to use the optional call keyword when calling a sub to indicate the call is to a procedure.

Posted to KB Topic: OOP
53 months ago, and updated 52 months ago

Code
Nothing New Since Your Last Visit
2599
Hits




Recently Updated

(Microsoft Access Group)

  KB Article    

Mike Prestwood
1. Access VBA Array (x = Array())

Arrays in Access VBA use a 0-based indice. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

Posted to KB Topic: Access & VBA
38 months ago

Code
Nothing New Since Your Last Visit  
4065
Hits

Mike Prestwood
2. Access VBA Empty String Check (Len(s&vbNullString))

In Access VBA, you have to add an empty string to the value being compared in order to get consistent results. For example, add &"" to your string varilable or it's code equivalent &vbNullString. Then compare to an empty string or verify it's length to 0 with Len.

Posted to KB Topic: Access & VBA
44 months ago

Code
Nothing New Since Your Last Visit
5289
Hits

Mike Prestwood
3. Access VBA Logical Operators (and, or, not)

Same as VB. Access VBA logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

Posted to KB Topic: Language Basics
51 months ago, and updated 44 months ago

Code

Article
Nothing New Since Your Last Visit  
8881
Hits

Mike Prestwood
4. Access VBA Self Keyword (Me)

Same as VB. The Me keyword is a built-in variable that refers to the class where the code is executing. For example, you can pass Me from one module to another.

Posted to KB Topic: Language Details
50 months ago

Code
Nothing New Since Your Last Visit
5387
Hits

Mike Prestwood
5. Access VBA Deployment Overview

You can deploy your Microsoft Access application either with the full version of Access or with the Access Runtime (see Deploying Applications Using the Access Runtime).

Posted to KB Topic: Language Basics
50 months ago

Code
Nothing New Since Your Last Visit
3064
Hits

Mike Prestwood
6. Access VBA Unary Operators

An operation with only one operand (a single input) such as + and -.

Posted to KB Topic: Language Basics
54 months ago, and updated 51 months ago

Code
Nothing New Since Your Last Visit
3042
Hits

Mike Prestwood
7. Access VBA Variables (Dim x as Integer)

Access VBA is a loosely typed language. Declaring variables is optional unless you use the Option Explicit statement to force explicit declaration of all variables with Dim, Private, Public, or ReDim. Using Option Explicit is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope. Variables declared with Dim at the module level are available to all procedures within the module. At the procedure level, variables are available only within the procedure.

Posted to KB Topic: Language Basics
54 months ago, and updated 51 months ago

Code

KB Post
Nothing New Since Your Last Visit
5050
Hits

Mike Prestwood
8. Access VBA Constants (Const kPI = 3.1459)

Scope can be Public, Global, or Private. The use of the newer Public keyword is preferred to the older Global. Private Const is the same as just specifying Const.

Posted to KB Topic: Language Basics
53 months ago, and updated 52 months ago

Code
Nothing New Since Your Last Visit
3789
Hits

Mike Prestwood
9. Access VBA Comments (' or REM)

Access VBA, like all the VB-based languages, uses a single quote (') or the original class-style basic "REM" (most developers just use a quote). Access VBA does NOT have a multiple line comment. Directives are sometimes called compiler or preprocessor directives. A # is used for directives within Access VBA code. Access VBA offers only an #If..then/#ElseIf/#Else directive.

Posted to KB Topic: Language Basics
54 months ago, and updated 52 months ago

Code

KB Post
Nothing New Since Your Last Visit
7113
Hits

Mike Prestwood
10. Access VBA Custom Routines (Sub, Function)

Access VBA is a non-OOP language with some OOP features. It offers both Subs and Functions. A Sub does not return a value while a Function does. When Subs and Functions are used in a class module, they become the methods of the class.

Posted to KB Topic: Language Details
54 months ago, and updated 52 months ago

Code

KB Post
Nothing New Since Your Last Visit
5456
Hits
Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
-
  Load Time=less than 1 second.
 
Print This
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


-
 
Connect With Us...
PrestwoodBoards
Join Us!
Facebook
Like our page!
Twitter
Follow us!
LinkedIn
Join Group
YouTube
View channel.
Go ahead!   Use Us! Call: 916-726-5675 


©1995-2013 Prestwood IT Solutions.   [Security & Privacy]   Made in the U.S.A..   No H1-B.   No offshoring.