473,385 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access ADO Report List

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)
Nov 12 '05 #1
1 2334
Lauren Quantrell wrote:
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.

< SNIP >
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
MSysObjects is not in an .adp file. Use the AllReports collection.
E.g. (from the help file):

Sub AllReports()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
' Search for open AccessObject objects in AllReports collection.
For Each obj In dbs.AllReports
If obj.IsLoaded = True Then
' Print name of obj.
Debug.Print obj.Name
End If
Next obj
End Sub

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQGzUm4echKqOuFEgEQLbKgCg553PhJSxPi8vIGDjuNanHF PRlroAoM5z
4LccuoaviuIJSBHlprHVRmvL
=xu/1
-----END PGP SIGNATURE-----

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
2
by: Tom Weddell | last post by:
Can I call an Access report from VB.Net? (I'm using access as the backend.) Thanks in advance.
2
by: Vikrant | last post by:
Hey Friends I need to export an Access Report using a filter. I am using the method OutputTo m_pDoCmd->OutputTo( 3, // asOutputReport COleVariant(strReportName), // <report name>...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
3
by: Kevin | last post by:
Allen, I tried creating one of the report list boxes you have on your page (http://allenbrowne.com/ser-19.html). I created the chk box, cmd button, and module (saved as EnumReports). I...
1
by: ellenh | last post by:
I have read postings on the similar subject including the posting from 2003 shown below. This process works fine to display a single page snapshot report in PowerPoint. I need to display...
8
by: ljungers | last post by:
Wondering if somone knows how to open a Access report in Word or export it to Word. Currently I'm opening and printing a report using VBA with the following command (DoCmd.OpenReport "TheReportName",...
6
by: DeniseY | last post by:
I have an Access report that is created on the fly by the user selecting the fields to be included. The Access report comes out fine, but I want it to automatically output to an Excel spreadsheet....
1
by: sonicfun2006 | last post by:
I have SQL Server Database and MS Access 2003 is connected with ODBC. I have very large amount of records in various tables. The database is very dynamic as it changes every minute. I’m trying to...
0
by: Kevin | last post by:
Hello, Does anyone know how to create columns that (potentially) span mutliple pages in an MS Access report? For example, imagine a 4 column HR Phone List sorted by Last Name. The number of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.