PDA

View Full Version : VBA Query to HTML Output



webdes03
10-29-2008, 04:21 PM
A little background on my issue here, we use a tool tracking application that runs on top of an access database. We want to create some reports and in an effort to save some money, I'm looking at the possibility of querying the access DB myself to generate reports outside of the software.

My question is this, is it possible to execute a query from a vba file and have it generate a HTML file? I could run the vba file as a scheduled task to generate the new report automatically. Aside from that, is it possible to run a real-time query from a HTML page itself, as in onLoad execute query and output results?

I'm very familiar with SQL and HTML, just not sure how to make the link with access and any guidence would be greatly appreciated.

OBP
10-30-2008, 05:37 AM
I have never used it but the Access VBA command

DoCmd.OutputTo acOutputTable, "Employees", _ acFormatHTML, "Employee.HTML", True

is supposed to output in an HTML format.
Why don't you run the Reports form within Access or the Tracking Application?

CreganTur
10-30-2008, 05:40 AM
If the above doesn't meet your requirements, then take a look at this article. (http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=436)

stanl
11-01-2008, 03:53 AM
Also, Jet 4.0 has an HTML ISAM that is excellent for converting Recordset Queries into HTML Tables.

see http://vblg.xocomp.net/ExternalDB.htm

Stan