Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML output

Status
Not open for further replies.

vb4me

Programmer
Nov 27, 2001
48
US
I need some help with outputting to HTML. Everywhere I have read says that none of the formatting etc comes through when you output to HTML. I have tested this and it is true.

I need to be able to format data on the output to do conditional formatting, e.g if the value is 1 it will be red, if it is 2 it will be yellow and so on. I have no problem doing this on a report but not on the HTML output.

Is there anyway of doing this? Will I need to create a template and if so what is the best way(I have no experience in HTML at all).

Any assistance will be appreciated.
 
I dont know to do it in an editable html but You can do it if the html is report based.
 
Access does not preserve this kind of formatting when outputting to HTML. I don't know what your report distribution requirements are, but since you have no experience with HTML, may I suggest that you output your reports in Snapshot format instead. This format preserves the Access formatting. However, your recipients of the report must have Access or a Snapshot Viewer (similar in concept to Adobe Acrobat Reader) installed on their PCs in order to view the report. This is not a big deal. The viewer is a free download from Microsoft.

If you must output your report in HTML, you'll need to learn some basic HTML coding, and then write quite a bit of VBA code to generate the HTML stream yourself. As an alternative, you could let Access output the report unformatted in HTML, then read that file back into VBA code and parse through it for the things you need to modify.
 
Another thought on this subject is to use Crystal Reports to generate the report and export it to HTML. Crystal Reports does a much better job of preserving formatting, including colors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top