-
June 20th, 2002, 11:22 PM
#1
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!!!
-
June 22nd, 2002, 09:43 AM
#2
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
-
June 22nd, 2002, 04:38 PM
#3
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
-
June 22nd, 2002, 09:30 PM
#4
It works if you want the HTML layout by your own style...
but, access and datareport can export to html..
-
June 24th, 2002, 07:29 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|