Databases Reference
In-Depth Information
Table 14-1. Standard-variable n a ming for VBA
Variable
Prefix
B oolean
b ool, b, or f
Byte
b, byt, or bt
C urrency
c ur
Date
dt or dte
D ouble
d or dbl
Integer
i, c, or int
L ong
l , c, or lng
Single
s or sng
S tring
s tr
User-defined type
typ, u, or ut
V ariant
v or var
Table 14-2. Object-variable naming for VBA
Variable
Prefix
Container
con
D atabase
d b
Document
doc
D ynaset
d yn
Error
err
F ield
f ld
Form
frm
I ndex
i dx
Object
obj
P arameter
p rm
Property
prp
Q ueryDef
q df
Recordset
rs
R elation
r el
Report
rpt
S napshot
s np
Table
tbl
T ableDef
t df or tbl
User
usr
Workspace
w s
14.1.3 Referencing the Properties and Methods of an Object
The general syntax for referring to an object's properties and methods is very simple.
Suppose that objVar is a variable that refers to an object. If AProperty is a property of
this object, then we can access this property using the syntax:
objVar.AProperty
If AMethod is a method for this object, then we can invoke that method with the syntax:
Search WWH ::




Custom Search