In the afterupdate event of the combobox or the onclick of some command button, put the following:
DoCmd.OpenReport Me![cboReport], acViewPreview
If you place this in the afterupdate event of the combobox, the report will open immediately after you select one...if you place it in a command button, you cans elect the report, then click the button to open the report.
****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
OKay, two things to consider. If you have only a few reports, then I would just enter the names in as values....if you have a whole bunch, or if they may change often, I would create dynamic function to get the currently list and display these...
****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
Don't know if you've solved your problem yet .... this works for me.
In the row source for the combo box enter:
"SELECT Mid([Name],4) AS Expr1 From MSysObjects WHERE (((MSysObjects.Type) = -32764) And ((Left([Name], 3)) = ""rpt"")ORDER BY Mid([Name],4);"
This will generate a dynamic list of report names. The query needs the first 3 letters of the report name to be "rpt". This way you won't get your subreports in the combo box.... if you've tagged them correctly. ;-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.