Yvonne,
   Buenos tardes senora. If there is a Data Access Pages expert on our list they may have something otherwise I'd suggest just writing code to create html files. It sounds like you are writing pages for a web site or directly to a server.

 Here's a real simple code example of what can be done using code to write the pages. I pray to God this makes sense!  Starting at the top with the write_html_pages routine...

Public Sub write_html_pages()
    'Author:        Duane Hennessy
    'Company:       Bandicoot Software, Australia
    'Date:          25/01/2006, 2:52 PM
    'Description:   self_explanatory_title
    'Notes:         notes_here

    Const strcProcedureName As String = "write_html_pages"
    On Error GoTo err_
    Dim rst As ADODB.Recordset
    Dim web_page As String
   
    Set rst = New ADODB.Recordset
    rst.Open "select * from Medical_Details", CurrentProject.Connection, _
        adOpenForwardOnly, adLockReadOnly
   
    If Not rst Is Nothing Then
        With rst
            If Not .BOF And Not .EOF Then
                .MoveFirst
                Do Until .EOF
                    web_page = build_web_page_code(.Fields("Medical_Group_Name").Value, "Some medical data")
                    create_web_page .Fields("Medical_Group_Name").Value, web_page
                    .MoveNext
                Loop
            End If
            .Close
        End With
    End If
exit_routine:
    MsgBox "finished"
    Exit Sub
err_:
    MsgBox Err.Number & vbCrLf & Err.Description, 0 + 48, strcProcedureName
    GoTo exit_routine
End Sub

Private Function build_web_page_code(ByVal medical_centre_name As String, _
    ByVal some_data As String) As String

    'Author:        Duane Hennessy
    'Company:       Bandicoot Software, Australia
    'Date:          25/01/2006, 2:59 PM
    'Description:   Write out the HTML code with the passed in data incorporated.
    'Notes:         notes_here

    Const strcProcedureName As String = "build_web_page_code"
    On Error GoTo err_
    Const PAGE_HEADER As String = "<html><head></head><body>"
    Const PAGE_END As String = "</body></html>"
    Dim body_code As String
   
    body_code = "<p>MEDICAL CENTRE: <span style='color:blue;font-size:20px;'>" & medical_centre_name & "</span></p>"
    body_code = body_code & "<p>DETAILS: <span style='color:blue;font-size:20px;'>" & some_data & "</span></p>"

    build_web_page_code = PAGE_HEADER & body_code & PAGE_END
exit_routine:
    Exit Function
err_:
    MsgBox Err.Number & vbCrLf & Err.Description, 0 + 48, strcProcedureName
    GoTo exit_routine
End Function


Private Sub create_web_page(ByVal medical_centre_name As String, ByVal web_page As String)
    'Author:        Duane Hennessy
    'Company:       Bandicoot Software, Australia
    'Date:          25/01/2006, 2:51 PM
    'Description:   Create a web page from the passed in details.
    'Notes:         notes_here

    Const strcProcedureName As String = "create_web_page"
    On Error GoTo err_
    Dim file_number As Integer 'Holds FreeFile number
    Dim read_string As String
    Dim file_name As String
   
    file_name = "c:\" & medical_centre_name & ".html"
   
    'Create file
    file_number = FreeFile(0)
   
    Open file_name For Append As #file_number 'write to file
    Print #file_number, web_page
    Close #file_number
   
exit_routine:
    Exit Sub
err_:
    MsgBox Err.Number & vbCrLf & Err.Description, 0 + 48, strcProcedureName
    GoTo exit_routine
End Sub


Hope this is of help....

I thank Buddha for every day I get to write code....Oooraah!

Duane Hennessy.
Bandicoot Software
Tropical Queensland, Australia
(ABN: 33 682 969 957)

Want Increased Productivity?
http://www.bandicootsoftware.com.au


--- In [email protected], "Jones, Yvonne" <[EMAIL PROTECTED]> wrote:
>
> Good Evening,
>
> I hope this email is reaching you in the best of health and spirits.
>
> I please forgive me if I am not stating this question correct or clearly
>
> Question:
>
> I have a report that produces a one page report for each medical group that
> we have (178 all together) Is there a way that I can create something that
> will that the field name with the medical groups name and create a htm file
> for each group and name it the name it that field?
>
> Thanks in Advance
>
> p.s. I have Access 2002
>




Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to