jwcolby
jwcolby at colbyconsulting.com
Fri May 16 11:15:51 CDT 2008
Drew,
The code is a function cboCallback(typical params here) calling a method
of a class.
The callback function (module):
Option Compare Database
Option Explicit
Const cstrModule As String = "basCallback"
Private mdb As DAO.Database
Private mclsCallback As clsCallBack
Function cboCallBack(control As control, ID As Variant, _
row As Variant, column As Variant, _
code As Variant) As Variant
On Error GoTo Err_cboCallBack
If code = acLBGetFormat Then
cboCallBack = -1
Exit Function
End If
'
'checks if the class is initialized
If mclsCallback Is Nothing Then
Set mclsCallback = New clsCallBack
If mdb Is Nothing Then
Set mdb = CurrentDb
End If
End If
'
'Calls the callback method of the class
cboCallBack = mclsCallback.mCallBack(control, ID, row, column, code)
Exit_cboCallBack:
On Error Resume Next
Exit Function
Err_cboCallBack:
LogErr Err.Number, Err.Description, Erl, cstrModule, ""
Resume Exit_cboCallBack
Resume 0 '.FOR TROUBLESHOOTING
End Function
> That shouldn't matter John, please post the code for your callback
> function.
John W. Colby
www.ColbyConsulting.com
Drew Wutka wrote:
> That shouldn't matter John, please post the code for your callback
> function.
>
> I've had large listboxes which are callback based too, which work fine.
>
> Drew