473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 12756
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.public.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.Application object:

Dim acApp As Access.Application
Set acApp=New Access.Application

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

acApp.OpenCurrentDatabase("......")
acApp.OpenCurrnetProject(".....")

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

acApp.DoCmd.OpenReport "......."

You need to investigate Access Object Model, particularly,
Access.Application and DoCmd objects. Once you learn more on them, you could
even dynamically modify existing reports before you open them for
previewing/printing.
"El_Embozador" <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
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...
6
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...
6
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...
3
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...
8
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...
1
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...
6
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...
6
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...
12
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.