Max Wanadoo
max.wanadoo at gmail.com
Fri Sep 25 23:34:48 CDT 2009
Yes, very similar to what I do. The problem is when I encounter a NEW format that I want, I have to sit down and recode it all based on the new fields, etc. Still- keeps me busy Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: 26 September 2009 05:30 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access to Web On 26 Sep 2009 at 4:53, Max Wanadoo wrote: > Stuart: > Wow, that must have taken a whole lot of time to hand-craft those sites. > They look very good. > It's not really as complicated as it looks. I leave the fancy design to my offsider at Cybermasta.com. All the nice stuff such as the header, footer, sidebars, style sheets etc goe in Server Side Includes or templates. I just do the grunt work on the data. Basically, it's a matter of Create a Table Definition Loop through a recordset with a few Print # statements in the loop to embed each record in a table row Read/write the footer template. Here's the relevant code for the Job Vacancies page: Print #1, <!--#include file="Header.inc" -->" 'Define Table Print #1, "<p align=center>" Print #1, "<table width=90% cellpadding=2 cellspacing=0 border=0 class=normal_b>" Print #1, "<COL width=""8%""><COL width=""27%""> <COL width=""25%""><col width = ""20%""><col width = ""10%""><col width = ""10%"">" 'Print Header Row Print #1, "<tr bgcolor=""#000066"" class=normal_w>" Print #1, "<td align=center><strong>Position No.</strong></td>" Print #1, "<td align=center><strong>Position</strong></td>" Print #1, "<td align=center><strong>Organization</strong></td>" Print #1, "<td align=center><strong>Location</strong></td>" Print #1, "<td align=center><strong>Closing Date</strong></td>" Print #1, "<td align=center><strong> </strong></td>" Print #1, "<td align=center><strong> </strong></td>" Print #1, "<td align=center><strong> </strong></td>" Print #1, "</tr>" 'Print Data Rows Set rs = CurrentDb.OpenRecordset("SELECT * FROM qryWebJobs order by GpCode, CLosingDate desc,OrganisationName,PositionTitle") Do While Not rs.EOF If strGpCode <> rs!gpcode Then 'show group header row Print #1, "<tr bgcolor=""dddddd""><td colspan = ""8"" align=center><strong><br><a Name=""OC" & rs!gpcode & """>" & rs!gpClass & "</a><br></strong></td></tr>" strGpCode = rs!gpcode End If Print #1, "<tr>" Print #1, "<td align=center valign=top>" & rs!Posnum & "</td>" Print #1, "<td align=left valign=top>" & rs!PositionTitle & "</td>" If rs!ShowClientName Then Print #1, "<td align=left valign=top>" & rs!OrganisationName & "</td>" Else Print #1, "<td align=left valign=top>" & Nz(rs!GenericName, " ") & "</td>" End If Print #1, "<td align=left valign=top>" & rs!Location & "</td>" Print #1, "<td align=left valign=top>" & IIf(rs!ClosingDate < Date, "Closed", Format(rs!ClosingDate, "d mmm yy")) & "</td>" Print #1, "<td align=left valign=top>" & IIf(rs!RestPNG, "PNG Citizens Only", " ") & "</td>" Print #1, "<td align=center valign=top><a href=""PDF_files/VI-PosDescr-" & rs!Posnum & ".pdf""><img src=""http://www.vanguardpng.com/images/job_details.gif"" width=""61"" height=""20"" border=""0"" alt=""job_details.gif - 450 Bytes""></a></td>" Print #1, "<td align=center valign=top><a href=""docs/VI-Appln-" & rs!Posnum & ".doc""><img src=""http://www.vanguardpng.com/images/apply_for_job.gif"" width=""53"" height=""20"" border=""0"" alt=""apply_for_job.gif - 397 Bytes""></a></td>" Print #1, "</td>" Print #1, "</tr>" rs.MoveNext Loop 'End Vacancy Loop Print #1, "</table>" Print #1, <!--#include file="Footer.inc" -->" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com