Re: Modifying reports with VB6
- From: "Jim Satterfield" <jsatterfield_at_charterfunerals_dot_com>
- Date: Wed, 3 Oct 2007 15:30:00 -0500
Well, what I've determined is that it will not work for me. The reason is
that you cannot use the runtime to open a report in design view, which you
can do via VB6 if Access is actually installed.. If you're unable to do that
you can't make the changes necessary to set the report back to using legal
size paper. Thanks for all the feedback.
Jim
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0B0F64BD-F4A2-423C-9682-6127752B35F9@xxxxxxxxxxxxxxxx
Sorry, Jim, I would not have an answer for you. I have not worked with
VB6
using Access; however, I do know you can use Access as a data source for a
VB6 application. That is what we used when I took a course in VB6, but it
has been a while, so I don't really remember how to do it.
--
Dave Hargis, Microsoft Access MVP
"Jim Satterfield" wrote:
Well, I'm still trying to find someplace with information on using the
Access 2000 runtime with VB6 and there's not much out there. One thing
that
I found on the Microsoft site was that the runtime does not support
CreateObject but does support GetObject. This makes me wonder if the line
Set appAccess = CreateObject("Access.Application") will work and it's not
clear that substituting GetObject will work either.
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4BF1FC56-B7D4-4D95-9A07-F6114554D643@xxxxxxxxxxxxxxxx
To instantiate an instance of Access, you will need at least the
runtime
installed. I have not tried to do the things you are trying, so I
don't
know
if it supports that or not, but I think it should.
--
Dave Hargis, Microsoft Access MVP
"Jim Satterfield" wrote:
Here is the code that crashes in the app I'm working on right now if
Access
isn't installed. Should it run on a PC that has the runtime installed?
Dim rpt As Report
Dim strDevModeExtra As String
Dim DevString As str_DEVMODE
Dim DM As type_DEVMODE
Dim appAccess As Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "N:\MktShare\marketdata.mdb", True
appAccess.DoCmd.OpenReport strName, acDesign 'Opens report in
Design
view.
Set rpt = Reports(strName)
If Not IsNull(rpt.PrtDevMode) Then
strDevModeExtra = rpt.PrtDevMode
DevString.RGB = strDevModeExtra
LSet DM = DevString
DM.lngFields = DM.lngFields Or DM.intOrientation 'Initialize
fields.
DM.intPaperSize = 5 'Legal size
DM.intOrientation = 2 'Landscape
LSet DevString = DM 'Update property.
Mid(strDevModeExtra, 1, 94) = DevString.RGB
rpt.PrtDevMode = strDevModeExtra
appAccess.DoCmd.Close acReport, strName, acSaveYes
appAccess.CloseCurrentDatabase
appAccess.Quit acExit
Set appAccess = Nothing
Else
End If
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F9F78D90-10B9-4872-9E9F-F2F22C36859C@xxxxxxxxxxxxxxxx
Probably in the KB articles on the MSDN web. If you are going to
instantiate
an application object, the application will have to be installed on
the
computer where the Access application lives.
--
Dave Hargis, Microsoft Access MVP
"Jim Satterfield" wrote:
I haven't found any documentation on the subject yet but I assume
that
having the runtime available means that the same calls I make to
Access
should work, like instantiating an application object, etc. If
there
are
special considerations where would I find documentation for it?
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3FE5C28C-01E6-407F-BD7E-1B3E266E7277@xxxxxxxxxxxxxxxx
Jim,
I am not absolutely clear on this issue. It is my understanding
that
the
runtime for 2007 is a free download. Prior to that, you had to
purchase a
license, but it was bundled with another product. It used to be
the
Developer's edition, but I am not even sure what it is now.
We use 2003 here and it is im Microsoft Office 2003 Access
Developers
Extensions.
--
Dave Hargis, Microsoft Access MVP
"Jim Satterfield" wrote:
What is the situation with licensing for the Access 2000
runtime?
The
actual
download page doesn't say anything. Another page that hasn't
been
updated
since 2004 says that you have to have the developer edition of
Office
to
use
it. But other versions are free for use. Does anyone have any
idea
on
this
issue?
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4A898B8C-B60F-44FC-8474-11EB6FE35A3C@xxxxxxxxxxxxxxxx
Because an Access report is an object within an Access
application,
it
cannot
be executed without using access. If you don't have full
Access,
it
is
possible, if you have it, to install a run time version of
Access.
--
Dave Hargis, Microsoft Access MVP
"Jim Satterfield" wrote:
I have a program written in VB6 with an mdb file backend on
the
server
in
Access 2000 format. I
have reports that I create on my computer that has Access
installed
that
I
need people on other computers to be able to print. The
problem
is
the
old
issue of Access resetting the paper size if it happens to run
out
of
legal
paper. The code that I've seen and used to fix this problem
depends
on
being
able to create an instance of the Access app. This of course
does
not
work
on a PC that doesn't have Access installed. Is there a way to
programmatically do this from VB6 without the Access
application? I
haven't
been able to find one.
.
- References:
- Re: Modifying reports with VB6
- From: Jim Satterfield
- Re: Modifying reports with VB6
- From: Klatuu
- Re: Modifying reports with VB6
- Prev by Date: RE: report with queries problem
- Next by Date: Re: Linked Table Wizard Doesn't Work
- Previous by thread: Re: Modifying reports with VB6
- Next by thread: Re: Sort by Date
- Index(es):
Relevant Pages
|