Reports Count in ms-access using visual basic

S

Sudhakara

Hi,
I am 10 reports in an access database. I want to get the
count of number of reports I have in the selected database
and fill the combo in my visual basic form with all the
reports names so that the user can select the report and
print the same.
How do I do this.
Can anyone help me on this.

Regards
sudhakara.T.P.
 
A

Allen Browne

Set the RowSource of your combo to:
SELECT [Name] FROM MsysObjects
WHERE ([Name] Not Like "~*") AND ([Type] = -32764))
ORDER BY [Name];

Alternatively, you could loop through the AllReports collection.
 

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