Access '97 runtime version won't print 
Author Message
 Access '97 runtime version won't print

OK. What did I do wrong? I have a database in Access '97 with several
routines that generate reports from local tables. The routines are kind of
tricky, but all the data is in the local .mdb. I don't open, write to, or
close anything. After I run my report, I can close the database, but not
Access! I have checked through my code to see if I left any object variables
set, but I couldn't find any. Even if I did, they should get set to nothing
when they go out of scope, right? The only way to get access to close is to
end the Task in my NT Task manager.

    Not only that, but on the test machine I am using, when I click my
"Print Report" button, the hourglass goes on, it goes off and that's that.
It is supposed to be opening a report in Preview mode using the OpenReport
method but nothing happens. If I open the same MDE on my development machine
using the /runtime switch, everything works great.

MAN IS THIS FRUSTRATING!!!

Can anyone help? This thing has to ship Wednesday.....

--
Andy Bohn, MCP
Information Control Corporation
http://www.*-*-*.com/



Fri, 20 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
Fix the other first, then see if you still have this problem.

Tom Ellison

Quote:

> OK. What did I do wrong? I have a database in Access '97 with several
> routines that generate reports from local tables. The routines are kind of
> tricky, but all the data is in the local .mdb. I don't open, write to, or
> close anything. After I run my report, I can close the database, but not
> Access! I have checked through my code to see if I left any object variables
> set, but I couldn't find any. Even if I did, they should get set to nothing
> when they go out of scope, right? The only way to get access to close is to
> end the Task in my NT Task manager.

>     Not only that, but on the test machine I am using, when I click my
> "Print Report" button, the hourglass goes on, it goes off and that's that.
> It is supposed to be opening a report in Preview mode using the OpenReport
> method but nothing happens. If I open the same MDE on my development machine
> using the /runtime switch, everything works great.

> MAN IS THIS FRUSTRATING!!!

> Can anyone help? This thing has to ship Wednesday.....

> --
> Andy Bohn, MCP
> Information Control Corporation
> http://www.icc-net.com



Fri, 20 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
Did you distribute the runtime using a setup created with the seup wizard?

If you did and included all the OCX 's and DLL's required everything should
work fine, mostly;-)

If it doesn't work still, does the target machine have Access 97 full
installed. If it does go in your program and look at the references, are any
missing? Would be worth setting up dev Access system on target machine to
see if it works then.

Quote:

>OK. What did I do wrong? I have a database in Access '97 with several
>routines that generate reports from local tables. The routines are kind of
>tricky, but all the data is in the local .mdb. I don't open, write to, or
>close anything. After I run my report, I can close the database, but not
>Access! I have checked through my code to see if I left any object
variables
>set, but I couldn't find any. Even if I did, they should get set to nothing
>when they go out of scope, right? The only way to get access to close is to
>end the Task in my NT Task manager.

>    Not only that, but on the test machine I am using, when I click my
>"Print Report" button, the hourglass goes on, it goes off and that's that.
>It is supposed to be opening a report in Preview mode using the OpenReport
>method but nothing happens. If I open the same MDE on my development
machine
>using the /runtime switch, everything works great.

>MAN IS THIS FRUSTRATING!!!

>Can anyone help? This thing has to ship Wednesday.....

>--
>Andy Bohn, MCP
>Information Control Corporation
>http://www.icc-net.com



Fri, 20 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
I assume you're using the
    DoCmd.Quit
to close your database. If not , that's your answer.

Can't help on the preview problem, although I do know that while MS say you
can test your run-time version by using the /runtime switch on your
development version - they're wrong!!  In most cases it's environmental -
missing dlls and wrong versions of support software.

Nick Stewart

Quote:

>OK. What did I do wrong? I have a database in Access '97 with several
>routines that generate reports from local tables. The routines are kind of
>tricky, but all the data is in the local .mdb. I don't open, write to, or
>close anything. After I run my report, I can close the database, but not
>Access! I have checked through my code to see if I left any object
variables
>set, but I couldn't find any. Even if I did, they should get set to nothing
>when they go out of scope, right? The only way to get access to close is to
>end the Task in my NT Task manager.

>    Not only that, but on the test machine I am using, when I click my
>"Print Report" button, the hourglass goes on, it goes off and that's that.
>It is supposed to be opening a report in Preview mode using the OpenReport
>method but nothing happens. If I open the same MDE on my development
machine
>using the /runtime switch, everything works great.

>MAN IS THIS FRUSTRATING!!!

>Can anyone help? This thing has to ship Wednesday.....

>--
>Andy Bohn, MCP
>Information Control Corporation
>http://www.icc-net.com



Sat, 21 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
On Access not closing
==================
Check again for Objects which you haven't expicitly set to nothing (not just
closed), yes they _should_ go out of scope but sometimes they don't.

Also check for implicit comparisons e.g.

    If MyCheckBox then ...

change these to explicit comparisons e.g.

    If MyCheckBox = True then ...

On the OpenReport failure
=====================
This can be a real tricky one.  Try implementing a logging routine so you
can see what is happening in the code.

I use a function to write a log file and then just call it to log data as I
use the data base, a simple version of this could be:

Sub LogEvent(CommentType As String, Comment As String)
    Dim strPath As String
    Dim intFF As Integer
    strPath = CurrentDb.Name
    strPath = Left(strPath, Len(strPath) - Len(Dir(strPath)))
    strPath = strPath & "Log.txt"
    intFF = FreeFile
    Open strPath For Append As intFF
    Write #intFF, CommentType, Comment, CurrentUser, Now
    Close intFF
End Sub

Then in code you'd do something like

    On error Got HandleMyErr

'Do Stuff
    call LogEvent("Test1", "OpeningReport")
    Docmd.OpenReport "SomeName"
    call LogEvent("Test2", "Report Opened")
'Other stuff

HandleMyErr:
    call LogEvent("Error", "ThisProcName - " & Err & " - " &
Err.Descriptio)

Obviously you can refine the Logging procedure, but at least you find
exactly what's happened and where.


Quote:

>OK. What did I do wrong? I have a database in Access '97 with several
>routines that generate reports from local tables. The routines are kind of
>tricky, but all the data is in the local .mdb. I don't open, write to, or
>close anything. After I run my report, I can close the database, but not
>Access! I have checked through my code to see if I left any object
variables
>set, but I couldn't find any. Even if I did, they should get set to nothing
>when they go out of scope, right? The only way to get access to close is to
>end the Task in my NT Task manager.

>    Not only that, but on the test machine I am using, when I click my
>"Print Report" button, the hourglass goes on, it goes off and that's that.
>It is supposed to be opening a report in Preview mode using the OpenReport
>method but nothing happens. If I open the same MDE on my development
machine
>using the /runtime switch, everything works great.

>MAN IS THIS FRUSTRATING!!!

>Can anyone help? This thing has to ship Wednesday.....

>--
>Andy Bohn, MCP
>Information Control Corporation
>http://www.icc-net.com



Sat, 21 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
I solved the non-print problem.
As I thought about it, I realized that my test machine probably didn't have
a printer installed.  Using Print Preview mode causes Access to send the
report through the print driver to the screen.  Installed a printer on the
machine and all is well there.  Still have the NO close problem but I will
look into the suggested knowledge base article on that.

Quote:

>On Access not closing
>==================
>Check again for Objects which you haven't expicitly set to nothing (not
just
>closed), yes they _should_ go out of scope but sometimes they don't.

>Also check for implicit comparisons e.g.

>    If MyCheckBox then ...

>change these to explicit comparisons e.g.

>    If MyCheckBox = True then ...

>On the OpenReport failure
>=====================
>This can be a real tricky one.  Try implementing a logging routine so you
>can see what is happening in the code.

>I use a function to write a log file and then just call it to log data as I
>use the data base, a simple version of this could be:

>Sub LogEvent(CommentType As String, Comment As String)
>    Dim strPath As String
>    Dim intFF As Integer
>    strPath = CurrentDb.Name
>    strPath = Left(strPath, Len(strPath) - Len(Dir(strPath)))
>    strPath = strPath & "Log.txt"
>    intFF = FreeFile
>    Open strPath For Append As intFF
>    Write #intFF, CommentType, Comment, CurrentUser, Now
>    Close intFF
>End Sub

>Then in code you'd do something like

>    On error Got HandleMyErr

>'Do Stuff
>    call LogEvent("Test1", "OpeningReport")
>    Docmd.OpenReport "SomeName"
>    call LogEvent("Test2", "Report Opened")
>'Other stuff

>HandleMyErr:
>    call LogEvent("Error", "ThisProcName - " & Err & " - " &
>Err.Descriptio)

>Obviously you can refine the Logging procedure, but at least you find
>exactly what's happened and where.



>>OK. What did I do wrong? I have a database in Access '97 with several
>>routines that generate reports from local tables. The routines are kind of
>>tricky, but all the data is in the local .mdb. I don't open, write to, or
>>close anything. After I run my report, I can close the database, but not
>>Access! I have checked through my code to see if I left any object
>variables
>>set, but I couldn't find any. Even if I did, they should get set to
nothing
>>when they go out of scope, right? The only way to get access to close is
to
>>end the Task in my NT Task manager.

>>    Not only that, but on the test machine I am using, when I click my
>>"Print Report" button, the hourglass goes on, it goes off and that's that.
>>It is supposed to be opening a report in Preview mode using the OpenReport
>>method but nothing happens. If I open the same MDE on my development
>machine
>>using the /runtime switch, everything works great.

>>MAN IS THIS FRUSTRATING!!!

>>Can anyone help? This thing has to ship Wednesday.....

>>--
>>Andy Bohn, MCP
>>Information Control Corporation
>>http://www.icc-net.com



Sat, 21 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print
We have seen the same issue you describe about closing the database but not
Access. If we first close the database, then there is a blank (gray) Access
screen sitting out there which looks functional, and which shows up on the
task manager, but which will not react to any input. The simple solution
that works for us is to never just close the database. Always Exit from
Access when you're done with one database. That does work, and closes both
at the same time. It's probably not a bad idea anyway, since it makes sure
there is nothing left lying around that might interfere with a new database
you open thereafter.

Charlie Gellert

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

Quote:

>OK. What did I do wrong? I have a database in Access '97 with several
>routines that generate reports from local tables. The routines are kind of
>tricky, but all the data is in the local .mdb. I don't open, write to, or
>close anything. After I run my report, I can close the database, but not
>Access! I have checked through my code to see if I left any object
variables
>set, but I couldn't find any. Even if I did, they should get set to nothing
>when they go out of scope, right? The only way to get access to close is to
>end the Task in my NT Task manager.

>    Not only that, but on the test machine I am using, when I click my
>"Print Report" button, the hourglass goes on, it goes off and that's that.
>It is supposed to be opening a report in Preview mode using the OpenReport
>method but nothing happens. If I open the same MDE on my development
machine
>using the /runtime switch, everything works great.

>MAN IS THIS FRUSTRATING!!!

>Can anyone help? This thing has to ship Wednesday.....

>--
>Andy Bohn, MCP
>Information Control Corporation
>http://www.icc-net.com



Sat, 21 Jul 2001 03:00:00 GMT  
 Access '97 runtime version won't print

Quote:

>OK. What did I do wrong? I have a database in Access '97 with several
>routines that generate reports from local tables. The routines are kind of
>tricky, but all the data is in the local .mdb. I don't open, write to, or
>close anything. After I run my report, I can close the database, but not
>Access! I have checked through my code to see if I left any object variables
>set, but I couldn't find any. Even if I did, they should get set to nothing
>when they go out of scope, right?

No.  Not only do you need to explicitly close any records and
databases you've opened in code you must explicitly "Set MyDB =
nothing"

Quote:
>    Not only that, but on the test machine I am using, when I click my
>"Print Report" button, the hourglass goes on, it goes off and that's that.
>It is supposed to be opening a report in Preview mode using the OpenReport
>method but nothing happens.

Not a clue on this one.  Preview works just fine for me.  I wonder if
the default printer or the printer for that report has been removed.

Tony
----
Message posted to newsgroup and emailed.
Tony Toews, Independent Computer Consultant
The Year 2000 crisis: Will my parents or your grand parents still be receiving
their pension in January, 2000?  See http://www.granite.ab.ca/year2000
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm



Sun, 22 Jul 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Module function won't compile in Access 97 Runtime

2. Access '97 won't close

3. Program from access 97 won't work in access 2000

4. Access 97 won't close

5. Access 97 Won't Quit even after environment cleaned up

6. Access 97 Won't Close after EXCEL VB Modules

7. 'VBox' ing a 97 Runtime App

8. Access Developer's Toolkit (for Access'97)

9. Problem's accessing multi-user Access'97 database from within MTS

10. Runtime won't work when accessing MDE file

11. Run-time error '3075': Access 97 and VB 5.0

12. Access 97 or higher-runtime versions

 

 
Powered by phpBB® Forum Software