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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Generation

Status
Not open for further replies.

asafblasberg

Programmer
Jun 22, 2004
21
US
Hello, I'm trying to create a Windows Form which shows records. Then when you hit preview, a window pops up and you see a report. then you hit print and it prints. How do you do this. I'm going from ACCESS VBA to VB.NET for an application test. Is this very difficult to do with VB.NET?
 
This forum is for more specific questions, what you are asking is a complete application.

But to answer your question. The transfer from ccess to vb.net can be very difficult and could demand a lot of work. On the other hand, once you get to know .net it could go very quick. It all depends how much time and effort you are wlling to put in the project. Begin by reading a good book and go from there.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
My experience with MS Access has been wonderful. Its a fantastic tool to build efficient and reliable applications. The development time is very less.

But if you are building big systems then probably VB.NET is a good tool.

Asafblasberg, if you are building applications where you can use Access, my suggestion would be stick with Access.

Anyway, if you want learn VB.NET gradually and want build few small applications, for sure its going to be rough ride but not impossible.

So coming back to your first question about Access report through VB.NET you can refer to this link:


or

Code Snippet:

Dim strSQLrpt As String
strSQLrpt = "Select * From SomeTable"
Dim rptNew As New Access.Application
With rptNew
.Visible = True
.DoCmd.Maximize()
.OpenCurrentDatabase("mdb Path", False)
.CurrentDb.QueryDefs("Query Name").SQL = strSQLrpt
.DoCmd.OpenReport("Report Name", Access.AcView.acViewPreview)
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top