Article ID: 170532
Article Last Modified on 1/20/2007
Option Explicit
Function MultiplyByTen(clsVar As Variant) As Variant
MultiplyByTen = clsVar * 10
End Function
Option Explicit
Function CallMultiplyByTen(stdVar As Variant) As Variant
Dim clsMultiply As New MultiplyClass
CallMultiplyByTen = clsMultiply.MultiplyByTen(stdVar)
End Function
Query: Query1
-----------------------------------------
Type: Select Query
Field: OrderID
Table: Orders
Field: Freight
Table: Orders
Field: EXPR1: CallMultiplyByTen([Freight])
Option Explicit
Function MultiplyByTen(clsVar As Variant) As Variant
MultiplyByTen = clsVar * 10
End Function
Query: ClassTestQuery
-------------------------------------
Type: Select Query
Field: Freight
Table: Orders
Field: Expr1:MultiplyByTen([Freight])
Form: ClassTestForm
-------------------------------------
ControlSource: Orders Table
Text box:
Name: Freight
Caption: Freight
ControlSource: Freight
Text box:
Name: Text1
Caption: Text1
ControlSource: =MultiplyByTen([Freight])
Report: ClassTestReport
---------------------------------------
ControlSource: Orders Table
Text box:
Name: Freight
Caption: Freight
ControlSource: Freight
Text box:
Name: Text1
Caption: Text1
ControlSource: =MultiplyByTen([Freight])
Macro Name Action
----------------------------
ClassTestMacro MsgBox
ClassTestMacro Action
-----------------------------
MsgBox
Message: =MultiplyByTen(5)
Beep: Yes
Type: None
Keywords: kbcode kbprb kbprogramming KB170532