I tried using this code to populate a list box with a list of reports
in my Access2k.ADP project, but it says MSysObjects is not valid
object name.
Any help is appreciated.
lq
Dim rs As New ADODB.Recordset, myStr As String
Dim i As Integer
rs.CursorLocation = adUseClient
rs.Open "Select Name from MSysObjects where Type = -32764",
CurrentProject.Connection, adOpenDynamic, adLockOptimistic
For i = 0 To (rs.RecordCount - 1)
If rs.EOF = False Then
myStr = ";" & myStr & rs.Fields(0).Value
rs.MoveNext
End If
Next i
Me.ListBox.RowSource = Mid(myStr, 2)