Hide access screen - makes it look like a normal prog. (1 Viewer)

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
I am using some code that hides the access screen itself eg Makes it look like a stand alone program.
This code relies on the forms etc being pop-up so that they can be seen. This bit of it works and look fantastic BUT !!!

The problem i have is that i can't preview my reports as i would like to because i can't seem to set them to pop-up.

Any help will be gratefully received.

Steve
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
You can place your reports on a popup form using the snapshot viewer. If you need an example I'll post one.

HTH
 

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
Thanks

___ said:
You can place your reports on a popup form using the snapshot viewer. If you need an example I'll post one.

HTH

If you could post an example that would be wonderful.
I am using access97
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
Here you are.
 

Attachments

  • Rpt On Popup formA97.zip
    8.7 KB · Views: 228

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
Just a though.
If i install this on someone elses computer would they have to download the snapshot viewer also?
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
indesisiv said:
Just a though.
If i install this on someone elses computer would they have to download the snapshot viewer also?
Yes, if it's not already installed.
 

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
Run Time error

I am getting a run time error.
runtime error 438 - Object doesn't support this property or method

I am getting this error message here

Code:
Sub sPrint(strReport As String, Optional booNoPreview As Boolean = True, Optional strFilter As String = "")

    sPrint_Init
    strRepFil = strFilter
    DoCmd.OutputTo acOutputReport, strReport, "Snapshot Format", strSavePath & strReport & ".snp"
    With ctlActiveXHolder
        .SnapshotPath = "C:\" & strReport & ".snp"
    End With

End Sub

on the line that has .SnapshotPath = "C:\" & strReport & ".snp"

I have snapshot viewer installed ??
Any ideas

Steve
 

R6Flyer

Yamaha hooligan
Local time
Today, 21:48
Joined
Nov 21, 2003
Messages
95
Originally posted by Indesisiv
I am using some code that hides the access screen itself eg Makes it look like a stand alone program.

What code are you using to hide the database window that relies on all forms being pop-up?

I also use a startup routine to make the database appear like a standalone app but don't need to have my forms set to pop-up. The reports display just fine because of this.

Where abouts in Yorkshire are you from? I could possibly let you have a cut down version of one of my db's to demonstrate how I go about it but I would need to do quite a bit of editing first as I also tend to pick up the network logon to limit access to data when using the db (one employee shouldn't be able to view data relating to a colleague, etc.).
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
Make sure you have a reference set to the Snapshot Viewer Control.
 

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
i am using
Code:
Option Compare Database
Option Explicit

Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3

Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long

Function fSetAccessWindow(nCmdShow As Long)

Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm

If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If

If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then
MsgBox "Cannot minimize Access with " _
& (loForm.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then
MsgBox "Cannot hide Access with " _
& (loForm.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
fSetAccessWindow = (loX <> 0)
End Function

and on open of my first form i am using
Code:
Call fSetAccessWindow(0)

Also i have the snapshot viewer reference selected + compiled and saved after ... still not working.

Also R6Flyer I am from east yorks.
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
indesisiv said:
Also i have the snapshot viewer reference selected + compiled and saved after ... still not working.
What code is in your forms load event?
 

indesisiv

Access - What's that?
Local time
Today, 21:48
Joined
Jun 13, 2002
Messages
265
My first form ?

Call fSetAccessWindow(0)
 

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
Also, you'll need to change this line of code in the module...
Code:
    strSavePath = "C:\"
    Set ctlActiveXHolder = Forms![[COLOR=Red]NameOfYourForm[/COLOR]].acxSna
 

a.sinatra

quik
Local time
Today, 13:48
Joined
Jan 10, 2004
Messages
262
Go to the reports properties and set the report to a pop-up & modal. The only problem you will have is there will be no "print" function if you need one because the access window will be hidden.
________
Vaporizer Affiliates
 
Last edited:

___

¯¯¯¯¯
Local time
Today, 21:48
Joined
Nov 27, 2003
Messages
595
a.sinatra said:
Go to the reports properties and set the report to a pop-up & modal.
Not possible in A97 or A2K, don't know about later versions.
 

a.sinatra

quik
Local time
Today, 13:48
Joined
Jan 10, 2004
Messages
262

Attachments

  • report.PNG
    report.PNG
    10 KB · Views: 131
Last edited:

=TB=

Registered User.
Local time
Today, 21:48
Joined
Aug 13, 2002
Messages
68
a.sinatra said:
Hrm. Alright, AXP & A2k3 have it.
(Sorry about that)


I have xp and whenever I have tried to set my reports to Pop Up and Module when hiding the database window as described here it never works. The Report loads hidden and I am left in situation I can only Ctrl-Alt-Del out of. The only thing I have been able to use with this method, that works is to use the snap shot viewer. I would love to able to use a standard report as it loads so much quicker, am I going wrong somewhere?
 

Users who are viewing this thread

Top Bottom