CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2002
    Posts
    4

    Question MSVisualBasic, MSAccess & HTML

    Hi Everibody!

    As you can see I'm new in this forum.

    I want you to help me with a stand-alone application that I'm currently developing in VisualBasic with MS Access.

    The issue is that after store some information in the DB I need to generate a complete report (query) and save it in the hard drive as a HTML document.

    Your help will be very apreciated!!!

  2. #2
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    23
    I remember looking into Access reports from VB a year or so ago. Access reports can be exported to various file formats including HTML. If you can do it in Access then you can call it from VB. I never actually used Access reports, I switched to Crystal, but I know that the topic has been beaten to death in various forums.

    Search some of the forums and you will find some answers.
    Thanks and Good Luck!!

    zemp

  3. #3
    Join Date
    Jun 2002
    Posts
    4
    Thanks but I think I'm going to use something like this:

    Private Sub CustomerList_Respond()
    With Response
    'Write the HTML header information and start a table
    .Write "<HTML>"
    .Write "<BODY>"
    .Write "<TABLE BORDER CELLSPACING=1 CELLPADDING=7>"

    'Fill in cells until the end of file is reached in the recordset
    Do While rs.EOF = False

    'Write the user's name and address to a row in the table
    .Write "<TR>"
    .Write "<TD>" & rs("lastname") & "," & rs("firstname") & "</TD>"
    .Write "<TD>" & rs("address") & "</TD>"
    .Write "<TD>" & rs("city") & "</TD>"
    .Write "<TD>" & rs("state") & "</TD>"
    .Write "<TD>" & rs("zipcode") & "</TD>"
    .Write "</TR>"

    'Move to the next record in the recordset, then loop
    rs.MoveNext

    Loop

    'End the table, then write closing tags for the page.
    .Write "</TABLE>"
    .Write "</BODY>"
    .Write "</HTML>"
    End With
    End Sub

    I suposse there is another method to do it (more efficient) but, I think it's gonna work.

    Thanks

  4. #4
    Join Date
    Apr 2002
    Posts
    65
    It works if you want the HTML layout by your own style...

    but, access and datareport can export to html..

  5. #5
    Join Date
    Jun 2002
    Posts
    4
    Thanks

    I would like to use my own style, I mean, add hyperlinks inside the report, etc. Datareport in VB is easier than the "handmatic method" but I don't know if it is posible to do.

    I any of you know how to do this, please let me know!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured