Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-11-2018, 09:19 AM   #1
gstylianou
Newly Registered User
 
Join Date: Dec 2013
Posts: 90
Thanks: 24
Thanked 1 Time in 1 Post
gstylianou is on a distinguished road
Open Report remotely from other database

Good evening to all,

I have the following issue. I have two databases, into the first one there is a form and one command button, and into the second there is a Report. Is there a way to open the Report remotely using the command button which is into the other database?

gstylianou is offline   Reply With Quote
Old 10-11-2018, 10:02 AM   #2
June7
Newly Registered User
 
Join Date: Mar 2014
Posts: 733
Thanks: 0
Thanked 169 Times in 169 Posts
June7 will become famous soon enough
Re: Open Report remotely from other database

Review https://bytes.com/topic/access/answe...ode-another-db and https://docs.microsoft.com/en-us/off...pplication.Run

So you need a procedure in other db that has OpenReport code.
__________________
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.

Last edited by June7; 10-11-2018 at 10:15 AM.
June7 is online now   Reply With Quote
Old 10-11-2018, 10:20 AM   #3
gstylianou
Newly Registered User
 
Join Date: Dec 2013
Posts: 90
Thanks: 24
Thanked 1 Time in 1 Post
gstylianou is on a distinguished road
Re: Open Report remotely from other database

Dear June,

Thanks, but still cannot manage the vba code in order to open the report from my second database.... Could you please apply a sample code?

gstylianou is offline   Reply With Quote
Old 10-11-2018, 10:48 AM   #4
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,593
Thanks: 89
Thanked 1,619 Times in 1,508 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Open Report remotely from other database

Alternatively, link any tables used by that report & import the report together with any underlying queries needed. Then run it from the main database.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 10-11-2018, 11:06 AM   #5
June7
Newly Registered User
 
Join Date: Mar 2014
Posts: 733
Thanks: 0
Thanked 169 Times in 169 Posts
June7 will become famous soon enough
Re: Open Report remotely from other database

What did you try? What happens? Post your attempted code. Following example works for me:
Code:
Private Sub Command29_Click()
Dim appAccess As New Access.Application
appAccess.OpenCurrentDatabase ("C:\Users\June\Overtime.accdb")
appAccess.Visible = True
appAccess.Run "Test"
End Sub
And now there is a second fully open db that user will have to close. Is that what you really want?
__________________
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
June7 is online now   Reply With Quote
Old 10-14-2018, 07:35 PM   #6
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 27,401
Thanks: 13
Thanked 1,416 Times in 1,350 Posts
Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light
Re: Open Report remotely from other database

Have you considered merging the applications? If they use the same data, perhaps there should be a single version of the FE rather than two.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 10-14-2018, 08:46 PM   #7
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 6,730
Thanks: 55
Thanked 2,143 Times in 2,054 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Open Report remotely from other database

highly consider Post #4.
very light. no other Access popping up.
no extra vba required.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 10-15-2018, 04:35 AM   #8
gstylianou
Newly Registered User
 
Join Date: Dec 2013
Posts: 90
Thanks: 24
Thanked 1 Time in 1 Post
gstylianou is on a distinguished road
Re: Open Report remotely from other database

Hello all of you,

My better description of this issue is:

We have an old database which is accde format and as you may know we can not do any changes on reports in case where this may needed. Also keep in mind that, the database is not split due to bad initial design, and that's why we have left it until we finish with a new version which its on process.

Because of the above serious issue, I thought to transfer all reports and all related tables and queries to a new accdb database (which will be locked), in order to make any changes may occur into reports, but i must find the way to call those reports using a command button into the main database (accde).

The resulting questions are:

1. If using vba code we can find the way to call the reports from the accde database, how will they be presented if they open? I must go to the second base (accdb) to see them?

2. Can those reports they appear inside the main database (accde) as a Pop-up report?

Thanks in advanced
gstylianou is offline   Reply With Quote
Old 10-15-2018, 05:44 AM   #9
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,593
Thanks: 89
Thanked 1,619 Times in 1,508 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Open Report remotely from other database

If I've understood you correctly, you want to copy database objects such as forms & reports from an ACCDE to a new ACCDB file.

Unfortunately that is not possible - ACCDE files are designed to prevent copying all database objects EXCEPT tables & queries
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 10-15-2018, 07:13 AM   #10
gstylianou
Newly Registered User
 
Join Date: Dec 2013
Posts: 90
Thanks: 24
Thanked 1 Time in 1 Post
gstylianou is on a distinguished road
Re: Open Report remotely from other database

Quote:
Originally Posted by isladogs View Post
If I've understood you correctly, you want to copy database objects such as forms & reports from an ACCDE to a new ACCDB file.

Unfortunately that is not possible - ACCDE files are designed to prevent copying all database objects EXCEPT tables & queries
No my friend isladogs...!!!! As i told, i want to open the reports (which are embedded into a database B accdb), using a command button from database A (accde)..
gstylianou is offline   Reply With Quote
Old 10-15-2018, 07:23 AM   #11
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,593
Thanks: 89
Thanked 1,619 Times in 1,508 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Open Report remotely from other database

Quote:
Originally Posted by gstylianou View Post
No my friend isladogs...!!!! As i told, i want to open the reports (which are embedded into a database B accdb), using a command button from database A (accde)..
Yes that's what I thought originally but in post #8 you wrote this

Quote:
Because of the above serious issue, I thought to transfer all reports and all related tables and queries to a new accdb database (which will be locked), in order to make any changes may occur into reports,
Hence my comment
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 10-15-2018, 10:19 AM   #12
June7
Newly Registered User
 
Join Date: Mar 2014
Posts: 733
Thanks: 0
Thanked 169 Times in 169 Posts
June7 will become famous soon enough
Re: Open Report remotely from other database

I could only get code to call a procedure in a general module, not procedure behind form such as button click. Since you cannot modify accde to create procedure, I see no solution.
__________________
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
June7 is online now   Reply With Quote
Old 10-15-2018, 12:03 PM   #13
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 12,307
Thanks: 62
Thanked 1,150 Times in 1,051 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Open Report remotely from other database

The problem is that most button clicks, if implemented by the form wizards, are defined with Private button_Click... which means that external access to the button click code using VBA to call it is not possible. There is no public reference point that you can "grab" in order to trigger the event.

I think this problem is insoluble as asked. If you had the developer's copy of that .ACCDE then maybe you could do something, but the .ACCDE is designed to stop this kind of internal exploration and "diddling about."
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
Old 10-15-2018, 12:41 PM   #14
gstylianou
Newly Registered User
 
Join Date: Dec 2013
Posts: 90
Thanks: 24
Thanked 1 Time in 1 Post
gstylianou is on a distinguished road
Re: Open Report remotely from other database

Quote:
Originally Posted by The_Doc_Man View Post
The problem is that most button clicks, if implemented by the form wizards, are defined with Private button_Click... which means that external access to the button click code using VBA to call it is not possible. There is no public reference point that you can "grab" in order to trigger the event.

I think this problem is insoluble as asked. If you had the developer's copy of that .ACCDE then maybe you could do something, but the .ACCDE is designed to stop this kind of internal exploration and "diddling about."


Dear friend Doc_man, i'm the developer of this accde database, so i have the accdb format. Do you have an idea ?

Note that, after any modification we would like to return again to accde format.
gstylianou is offline   Reply With Quote
Old 10-15-2018, 02:31 PM   #15
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 12,307
Thanks: 62
Thanked 1,150 Times in 1,051 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Open Report remotely from other database

If the .ACCDE in file B contains data not in file A, you could copy the report to file A and LINK to the tables in file B, then re-point that report's data sources and run the PRINT operation directly from file A. June7 has also posted an option.

If neither of these are going to work for you, you have painted yourself into a corner.

__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Split Access 2010 database can I relink remotely Bursal Theory and practice of database design 5 05-31-2013 01:29 PM
Change Database password remotely DCrake Sample Databases 0 03-08-2011 04:48 AM
Remotely accessable database marleyuk Modules & VBA 8 02-10-2009 01:22 PM
Determining the number of Vbcomponents in an Access database remotely opened by Excel anichebe Modules & VBA 1 08-24-2005 12:23 PM
Opening Database Remotely lucour General 1 05-24-2004 07:03 PM




All times are GMT -8. The time now is 03:02 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World