473,480 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reports

Is it possible to create a report in a back end Access db and then call/show
it from a VB front end?
TIA

--
Allen @ Home

When an old lady got hit by a truck
I saw a wicked gleam in your eye
Nov 12 '05 #1
2 2578
SA

Sure it can be done; provided the user has either full Access or the run
time version installed on their computer. You simply have to use automation
to launch Acces and display or print the report as in:

Dim objAccess as Object
Const acViewPreview = 2
Const acSysCmdGetObjectState = 10
Const acObjStateOpen = 1: acReport = 3
Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase "PathToYourDb"
objAccess.DoCmd.OpenReport "MyReport", acViewPreview
While objAccess.SysCmd(acSysCmdGetObjectState, acReport, "MyReport") = _
acObjStateOpen
DoEvents
Wend
objAccess.CloseCurrentDatabase
objAccess.Quit
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg
"Allen@Home" <at**@takeyourhatoff.ntalk.org> wrote in message
news:Zz****************@newsfep4-glfd.server.ntli.net...
Is it possible to create a report in a back end Access db and then call/show it from a VB front end?
TIA

--
Allen @ Home

When an old lady got hit by a truck
I saw a wicked gleam in your eye

Nov 12 '05 #2
Thank you very muchly :-))
--
Allen @ Home

When an old lady got hit by a truck
I saw a wicked gleam in your eye

SA wrote:
:: Sure it can be done; provided the user has either full Access or the run
:: time version installed on their computer. You simply have to use
automation
:: to launch Acces and display or print the report as in:
::
:: Dim objAccess as Object
:: Const acViewPreview = 2
:: Const acSysCmdGetObjectState = 10
:: Const acObjStateOpen = 1: acReport = 3
:: Set objAccess = CreateObject("Access.Application")
:: objAccess.OpenCurrentDatabase "PathToYourDb"
:: objAccess.DoCmd.OpenReport "MyReport", acViewPreview
:: While objAccess.SysCmd(acSysCmdGetObjectState, acReport, "MyReport") = _
:: acObjStateOpen
:: DoEvents
:: Wend
:: objAccess.CloseCurrentDatabase
:: objAccess.Quit
:: --
:: Steve Arbaugh
:: ACG Soft
:: http://ourworld.compuserve.com/homepages/attac-cg
::
::
:: "Allen@Home" <at**@takeyourhatoff.ntalk.org> wrote in message
:: news:Zz****************@newsfep4-glfd.server.ntli.net...
::: Is it possible to create a report in a back end Access db and then
call/show
::: it from a VB front end?
::: TIA
:::
::: --
::: Allen @ Home
:::
::: When an old lady got hit by a truck
::: I saw a wicked gleam in your eye
Nov 12 '05 #3

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

Similar topics

5
2995
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
2
5752
by: Andrew | last post by:
Hi there: I can successfully control a report's GroupLevel ControlSource property by using: ..Reports!rptEESTMT_A.GroupLevel(i).ControlSource = "CorpName" where rptEESTMT_A is the actual...
0
2233
by: Ian | last post by:
(Sorry if I have repeated this, it did not appear the first time) I have the following code on a button. The idea is that when this button is clicked it prints several reports automatically then...
3
6882
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
1
2125
by: KEVIN97810 | last post by:
Hello to all, I am trying to fill all my reports in a listbox but I may not need to show other reports. How do you modify this function to do that. I have losts of reports but don't want to...
2
3247
by: B.Newman | last post by:
I've got some VB.NET code that *should* get a list of reports from an Access MDB and populate a list box with them. It doesn't detect any of the reports at all. oAccess.Reports.Count comes up as...
3
8907
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
12
2498
by: Tony Ciconte | last post by:
We are evaluating the prospect of integrating and/or using Crystal Reports with some of our current products. Some of these are still in Access 97 and are running well. Since we cannot include the...
16
6483
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
3
5105
by: joelpollock | last post by:
I'm having trouble continuously page numbering a large report in MS Access. The report is made up of three separate Access reports which I join together at the end. In the past I have opened the...
0
6908
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
7088
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...
1
6741
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
6956
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...
0
5342
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,...
0
4485
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...
0
1300
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 ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
183
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...

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.