473,765 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print MS Access report form visual basic

Hi , please can you tell how i can print an MS ACCESS Report form visual
basic, i ned a sample code ..

Thanks

Jul 17 '05 #1
1 12774
This question has been ansered in variuos VB NG for many, many times over
many years. If you do a Google search comp.lang.basic .* or
miscrosoft.publ ic.vb.*, you could get scores of post regarding this topic.

Anyways, here is the hint:

1. Set reference to Access Object Library in your VB project. (that means,
your app will need Access installed to run this functionality);

2. Launch Access from your code by creating Access.Applicat ion object:

Dim acApp As Access.Applicat ion
Set acApp=New Access.Applicat ion

then you need to open the *.mdb (or *.adp file if it is an Access Project):

acApp.OpenCurre ntDatabase("... ...")
acApp.OpenCurrn etProject(".... .")

3. Use DoCmd object to open existing report in *.mdb file.

acApp.DoCmd.Ope nReport "......."

You need to investigate Access Object Model, particularly,
Access.Applicat ion and DoCmd objects. Once you learn more on them, you could
even dynamically modify existing reports before you open them for
previewing/printing.
"El_Embozad or" <bo****@telcel. net.ve> wrote in message
news:DL******** ********@news01 .t-net.net.ve...
Hi , please can you tell how i can print an MS ACCESS Report form visual
basic, i ned a sample code ..

Thanks

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9484
by: Prakash Wadhwani | last post by:
Under Tools->Startup I have set AllowBuiltInToolbars to NO. Thus in the Print Preview Window, the user cannot CLOSE the window or even Print. In my Report's on Open Event I place the foll code: DoCmd.ShowToolbar "Print Preview", acToolbarYes
6
4753
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
6
2074
by: Greg Teets | last post by:
I am new to VB and Access reports. Is it correct to say that VB and Access have the same report engine or method? After I do all the dragging and dropping, is there a way to see the specs for the report somewhere? Or the code that produces the report? Thanks, Greg Teets
3
6429
by: Zlatko Matiæ | last post by:
Hello. I tried to print the current situation on the form/subform/subform...but it seems that Access prints all the records on all the subforms. I would like to print just the image (something like print screen) of the current situation on my form with several subforms, not all the records. I want that print-out shows exactly what I see on the screen. How to do it ?
8
25403
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I believe this field contains data I need. When I view the table in datasheet view, all I can see in this field is the string "Long binary data". So, I've got the problem of needing to extract data from this field, but I don't know what format...
1
1269
by: clusardi2k | last post by:
Greetings, What is an easy way to print a report? I own the below books and I just begun to use VB Rel 8! Mastering Visual Basic 2005 by Evangelos Petroutsos Programming Microsoft Visual Basic 2005: The Language by Francesco Balena Microsoft Visual Basic 2005 Step by Step by Michael Halvorson Introducting Microsoft Visual Basic 2005 For Developers by Sean
6
1950
by: JonC | last post by:
I am developing an Access database and need to be able to print a form with various selections made as it appears on screen. The standard way of doing this would be to create a report based on the form but the form is quite complex with nested subforms and page tabs and trying to filter the records is proving to be a nightmare. I'm sure there must be some VB code that could do this for me but I'm a bit of a novice. Printing the screen...
6
9429
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
12
3540
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to print the report three times, but do not know how
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.