A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Opening a report in a different access database



 
 
Thread Tools Display Modes
  #1  
Old January 9th, 2009, 11:10 AM posted to microsoft.public.access.tablesdbdesign
AndrewDB
external usenet poster
 
Posts: 35
Default Opening a report in a different access database

I am using an Access database to fill in and print claim forms. The claim
form itself is embedded as a bitmap to the background of the report. This has
made the Access application file very big (177Mb). I need to reduce the size
of the application file. I want to place these reports in a different Access
file to the application and then open them in preview using VBA from the
application file. I can transfer the data but can't get the reports to open
in preview.
  #2  
Old January 9th, 2009, 12:23 PM posted to microsoft.public.access.tablesdbdesign
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default Opening a report in a different access database

Hi Andrew,

Instead of embedding the image why not link to it. Less overhead.

Bonnie
http://www.dataplus-svc.com

AndrewDB wrote:
I am using an Access database to fill in and print claim forms. The claim
form itself is embedded as a bitmap to the background of the report. This has
made the Access application file very big (177Mb). I need to reduce the size
of the application file. I want to place these reports in a different Access
file to the application and then open them in preview using VBA from the
application file. I can transfer the data but can't get the reports to open
in preview.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200901/1

  #3  
Old January 9th, 2009, 11:20 PM posted to microsoft.public.access.tablesdbdesign
AndrewDB
external usenet poster
 
Posts: 35
Default Opening a report in a different access database

Hi Bonnie
Thanx for your response. I did try that initially but had problems with the
registration between the form image and database fields. Each time the report
was opened the fields did not correspond to the field labels contained in the
background image by varying amounts. Embedding the image gave me the accuracy
I need each time. So back to my problem, can you assist?

Regards

--
Kepior Senso Fumor


"bhicks11 via AccessMonster.com" wrote:

Hi Andrew,

Instead of embedding the image why not link to it. Less overhead.

Bonnie
http://www.dataplus-svc.com

AndrewDB wrote:
I am using an Access database to fill in and print claim forms. The claim
form itself is embedded as a bitmap to the background of the report. This has
made the Access application file very big (177Mb). I need to reduce the size
of the application file. I want to place these reports in a different Access
file to the application and then open them in preview using VBA from the
application file. I can transfer the data but can't get the reports to open
in preview.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200901/1


  #4  
Old January 10th, 2009, 02:36 AM posted to microsoft.public.access.tablesdbdesign
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default Opening a report in a different access database

No sorry Andrew. If it were me I would work on fixing the issue of the
fields not corresponding and go back to linking the images.

Bonnie
http://www.dataplus-svc.com

AndrewDB wrote:
Hi Bonnie
Thanx for your response. I did try that initially but had problems with the
registration between the form image and database fields. Each time the report
was opened the fields did not correspond to the field labels contained in the
background image by varying amounts. Embedding the image gave me the accuracy
I need each time. So back to my problem, can you assist?

Regards

Hi Andrew,

[quoted text clipped - 10 lines]
application file. I can transfer the data but can't get the reports to open
in preview.


--
Message posted via http://www.accessmonster.com

  #5  
Old January 10th, 2009, 06:17 AM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Opening a report in a different access database

Hi Andrew,

177 MB, while big, is not very big; the maximum size of an Access
database is 2 GB. However, to do what you want you should use queries and
linked tables in your reports database so that you do not actually need to
copy any data. To open them from the original database place this in a
regular module:

==================================================

Private m_appAccess As Access.Application

Public Sub PreviewARemoteReport(ByVal strReportName As String)

If m_appAccess Is Nothing Then
Set m_appAccess = New Access.Application
End If
With m_appAccess
If .CurrentProject.FullName = vbNullString Then
' Database not open
.OpenCurrentDatabase "C:\Temp\Reports Database.mdb"
.Visible = True
Else
' Database already open
' Make sure the report is closed so it will use up-to-date
information
.DoCmd.Close acReport, strReportName, acSaveNo
' Toggle visibility twice to make the database come to the front
.Visible = False
.Visible = True
End If
.DoCmd.OpenReport strReportName, acViewPreview
End With

End Sub

Public Sub CloseRemoteDatabase()

If Not m_appAccess Is Nothing Then
If m_appAccess.CurrentProject.FullName vbNullString Then
m_appAccess.CloseCurrentDatabase
End If
Set m_appAccess = Nothing
End If

End Sub

=================================================

Fix the remote data base name. Then when you want to open a report do:

PreviewARemoteReport "rptMyReport"

This will fire up another copy of Access and open the specified report.
Or, if a previously used second copy is still running, it will use it.

Before you or your users exit out of Access make sure the following is
run:

CloseRemoteDatabase

Hope this helps,

Clifford Bass

"AndrewDB" wrote:

I am using an Access database to fill in and print claim forms. The claim
form itself is embedded as a bitmap to the background of the report. This has
made the Access application file very big (177Mb). I need to reduce the size
of the application file. I want to place these reports in a different Access
file to the application and then open them in preview using VBA from the
application file. I can transfer the data but can't get the reports to open
in preview.

  #6  
Old January 10th, 2009, 10:57 AM posted to microsoft.public.access.tablesdbdesign
AndrewDB
external usenet poster
 
Posts: 35
Default Opening a report in a different access database

Thanx Bonnie and Clifford. I really appreciate the support.

Andrew
--
Kepior Senso Fumor


"Clifford Bass" wrote:

Hi Andrew,

177 MB, while big, is not very big; the maximum size of an Access
database is 2 GB. However, to do what you want you should use queries and
linked tables in your reports database so that you do not actually need to
copy any data. To open them from the original database place this in a
regular module:

==================================================

Private m_appAccess As Access.Application

Public Sub PreviewARemoteReport(ByVal strReportName As String)

If m_appAccess Is Nothing Then
Set m_appAccess = New Access.Application
End If
With m_appAccess
If .CurrentProject.FullName = vbNullString Then
' Database not open
.OpenCurrentDatabase "C:\Temp\Reports Database.mdb"
.Visible = True
Else
' Database already open
' Make sure the report is closed so it will use up-to-date
information
.DoCmd.Close acReport, strReportName, acSaveNo
' Toggle visibility twice to make the database come to the front
.Visible = False
.Visible = True
End If
.DoCmd.OpenReport strReportName, acViewPreview
End With

End Sub

Public Sub CloseRemoteDatabase()

If Not m_appAccess Is Nothing Then
If m_appAccess.CurrentProject.FullName vbNullString Then
m_appAccess.CloseCurrentDatabase
End If
Set m_appAccess = Nothing
End If

End Sub

=================================================

Fix the remote data base name. Then when you want to open a report do:

PreviewARemoteReport "rptMyReport"

This will fire up another copy of Access and open the specified report.
Or, if a previously used second copy is still running, it will use it.

Before you or your users exit out of Access make sure the following is
run:

CloseRemoteDatabase

Hope this helps,

Clifford Bass

"AndrewDB" wrote:

I am using an Access database to fill in and print claim forms. The claim
form itself is embedded as a bitmap to the background of the report. This has
made the Access application file very big (177Mb). I need to reduce the size
of the application file. I want to place these reports in a different Access
file to the application and then open them in preview using VBA from the
application file. I can transfer the data but can't get the reports to open
in preview.

  #7  
Old January 10th, 2009, 11:31 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Opening a report in a different access database

You are welcome Andrew!

Clifford Bass

"AndrewDB" wrote:

Thanx Bonnie and Clifford. I really appreciate the support.

Andrew
--
Kepior Senso Fumor

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.