Access VBA Macro Programming
This gives the answer 5.3333. MsgBox 10 + 6 / 3 This gives the answer 12. In the first example, the parentheses force10 + 6to be ...
A Type Mismatch error occurs if one operand is numeric and the other is a string, as shown here: MsgBox 1 + " Richard" Note this ...
If RecSet![First Name] = "Nancy" Then RecSet.Edit RecSet![Company] = "Northwind" RecSet.Update End If RecSet.MoveNext Loop If Ms ...
^ Operator The^operator raises a number to the power of an exponent. MsgBox 2 ^ 3 The answer is 8 (2 to the power of 3). The ope ...
This will return the value of MyField for the last record in the table MyTable. You can use an optional criterion as follows: Ms ...
Concatenation Operator The concatenation operator (&) concatenates two operands together. MsgBox "Richard " & "Shepherd" ...
This will return the sum of all MyField values in the table MyTable. MyField must be a numeric data type. You can use an optiona ...
Each column of this table shows a binary bit based on an eight-bit number. The bit values are shown in bold across the top. The ...
Printer Printerwill allow you access to the default printer properties. You can view the name of the default printer using the f ...
The following returns False because there is no True value: MsgBox False Or False It works using binary arithmetic, on the basis ...
This will display the name of each report loaded, but notice that it does not include reports that are not loaded. You can addre ...
Xor Operator Xoris very similar toOr, except that True and True make False. Only True and False make True, but there must be one ...
Version Versionwill tell you the version of Access that is being run. This is useful to know when the user loads your applicatio ...
The following will return the value 84: MsgBox 145 Xor 197 This operator is often used in simple encryption routines. You use a ...
AllowAdditions On a form, you can set theAllowAdditionsproperty to allow or deny users from adding new records to the underlying ...
You can also use wildcard characters. A?denotes a single character and a*denotes a string of characters. It is exactly the same ...
Filter TheFilterproperty returns the filter that is being used on the form: MsgBox Me.Filter It can also be used to set the filt ...
Chapter 7 Debugging Chapter 7 Debugging I n any code you write, bugs may exist that can cause a program failure, cause the progr ...
half-drawn on the screen, which looks untidy to the user. Doing aRepaintbefore the process is run tidies the form up. Me.Repaint ...
now,” and then rerun the procedure, and up comes another one! This can be very frustrating, but the best answer to fixing it is ...
«
12
13
14
15
16
17
18
19
20
21
»
Free download pdf