Callback Function

G

George Pryhuber

I created a from that I want to display all the databases
reports via a callback function.
I reviewed the procedure shown in the Solutions db but
need help with it.
Would you be able to correct the following code so it
would display the databases reports.

Function Reports_Fill(ctl As Control, lngID As Long,
lngRow As Long, lngCol As Long, intCode As Integer) As
Variant
Dim frm As Form_Reports

'Error if Form_Reports form isn't open.
Const conFormNotOpen = 2450

On Error GoTo Fill_Error

Select Case intCode
Case acLBInitialize 'Initialize the listbox.
Set colForm_Reports =
[Reports].ReturnCollection
lstForms_Fill = True

Case acLBOpen 'Open.
Reports_Fill = Timer

Case acLBGetRowCount 'Get the number of
rows.
Reports_Fill = colForm_Reports.Count

Case acLBGetColumnCount 'Get the number of
columns.
Reports_Fill = 1

Case acLBGetColumnWidth 'Get the column width.
Reports_Fill = -1 'Use the default width.

Case acLBGetValue 'Get the data.
Set frm = colForm_Reports(lngRow + 1)
Reports_Fill = [Reports]

End Select
Exit Function

Thank you,

George Pryhuber
 
A

Allen Browne

The callback functions are message and slow.

This query works in all versions of Access:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32764) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY [Name];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top