List of Reports Out of Order

G

Guest

Hi - I am trying to populate a list box with a list of all the reports in
my database. I've tried a couple of different ways:
in code:

Me!lstSelectReport.RowSourceType = "Value List"
intCount = CurrentProject.AllReports.Count - 1
Do While intCount > 0
Me!lstSelectReport.AddItem _
CurrentProject.AllReports(intCount).Name
intCount = intCount - 1
Loop

and also via SQL statement as the rowsource:
SELECT MSysObjects.Name FROM MSysObjects WHERE
(((Left([Name],1))<>"~") AND ((MSysObjects.Type)=-32764)) ORDER BY
MSysObjects.Name;

and the list of reports still does not come out in the order they are shown
in the database (alphabetical).

Can anyone help me get a list of my reports out in alphabetical order?

Thanks!
 
D

Douglas J. Steele

The latter approach (i.e. the SQL) should be in alphabetic order. Can you
post an example of the missorted list?
 

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