PC Review


Reply
Thread Tools Rate Thread

Output to causing out of memory problem

 
 
Pat
Guest
Posts: n/a
 
      2nd Aug 2003
I have a form that allows the user to create a report/letter
which can be previewed or printed with no problem.

I also have on the form a button that will output the report in rtf format
to
a word document that the user can save on his computer.

This button works fine but after the new file is created, the computer does
not have enough memory to move to another program like autocad for example
which
may have been already open.

Is there something that I should be doing to close thing or release some
thing so that this
doesn't happen.

the code includes:

Private Sub Command37_Click() 'SAVE TO FILE
On Error GoTo Err_Command37_Click

Dim DTE, FLNAME As String

Me![E LETER DATE].Format = "MM-DD-YY"
DTE = CStr(Format(Me![E LETER DATE], "MM-DD-YY"))
FLNAME = Me![JOB NUMBER] & " COVER LETTER " & DTE & ".RTF"

'MsgBox FLNAME
If MsgBox("SAVING LETTER TO " & Chr(13) & Chr(10) & FLNAME & " IN MY
DOCUMENTS" & Chr(13) & Chr(10) _
& "TO PROCEED CLICK OK, TO CHANGE FILE NAME OR CANCEL CLICK
CANCEL", vbInformation + vbOKCancel, _
"SAVE TO FILE") = vbOK Then

DoCmd.OutputTo acReport, "COVER LETTER", acFormatRTF, FLNAME, False

Else
DoCmd.OutputTo acOutputReport, "COVER LETTER", acFormatRTF, , False
End If

DoCmd.CLOSE acReport, "cover letter"
Me!SAVED = True

Exit_Command37_Click:
Exit Sub

Err_Command37_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command37_Click

End Sub

NOTE AGAIN THAT the code executes perfectly well, just have a problem with
memory afterwards

thanks


 
Reply With Quote
 
 
 
 
JohnFol
Guest
Posts: n/a
 
      4th Aug 2003
It sounds like a memory leak with the report and not the code. You could
eliminate the code completely by using the database window.

I know that Access used to have a memory leak with lines on reports, but I
though this was fixed around Acc95.
Apart from that it tends to be OS / Printer driver. What OS are you using
and which printer?




"Pat" <(E-Mail Removed)> wrote in message
news:53TWa.44967$(E-Mail Removed)...
> I have a form that allows the user to create a report/letter
> which can be previewed or printed with no problem.
>
> I also have on the form a button that will output the report in rtf format
> to
> a word document that the user can save on his computer.
>
> This button works fine but after the new file is created, the computer

does
> not have enough memory to move to another program like autocad for example
> which
> may have been already open.
>
> Is there something that I should be doing to close thing or release some
> thing so that this
> doesn't happen.
>
> the code includes:
>
> Private Sub Command37_Click() 'SAVE TO FILE
> On Error GoTo Err_Command37_Click
>
> Dim DTE, FLNAME As String
>
> Me![E LETER DATE].Format = "MM-DD-YY"
> DTE = CStr(Format(Me![E LETER DATE], "MM-DD-YY"))
> FLNAME = Me![JOB NUMBER] & " COVER LETTER " & DTE & ".RTF"
>
> 'MsgBox FLNAME
> If MsgBox("SAVING LETTER TO " & Chr(13) & Chr(10) & FLNAME & " IN MY
> DOCUMENTS" & Chr(13) & Chr(10) _
> & "TO PROCEED CLICK OK, TO CHANGE FILE NAME OR CANCEL CLICK
> CANCEL", vbInformation + vbOKCancel, _
> "SAVE TO FILE") = vbOK Then
>
> DoCmd.OutputTo acReport, "COVER LETTER", acFormatRTF, FLNAME, False
>
> Else
> DoCmd.OutputTo acOutputReport, "COVER LETTER", acFormatRTF, , False
> End If
>
> DoCmd.CLOSE acReport, "cover letter"
> Me!SAVED = True
>
> Exit_Command37_Click:
> Exit Sub
>
> Err_Command37_Click:
> MsgBox Err.DESCRIPTION
> Resume Exit_Command37_Click
>
> End Sub
>
> NOTE AGAIN THAT the code executes perfectly well, just have a problem with
> memory afterwards
>
> thanks
>
>



 
Reply With Quote
 
Pat
Guest
Posts: n/a
 
      4th Aug 2003
There are 5 or 6 people who would regularly use this
operation using Windows 98 through Windows Xp.
They're all connected to an HP laser printer, but when
using this command button, they don't print or even preview the report,
I know that the report has to opened and formatted etc, that's why I thought
that closing it might help, but it doesn't seem to.


"JohnFol" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> It sounds like a memory leak with the report and not the code. You could
> eliminate the code completely by using the database window.
>
> I know that Access used to have a memory leak with lines on reports, but I
> though this was fixed around Acc95.
> Apart from that it tends to be OS / Printer driver. What OS are you using
> and which printer?
>
>
>
>
> "Pat" <(E-Mail Removed)> wrote in message
> news:53TWa.44967$(E-Mail Removed)...
> > I have a form that allows the user to create a report/letter
> > which can be previewed or printed with no problem.
> >
> > I also have on the form a button that will output the report in rtf

format
> > to
> > a word document that the user can save on his computer.
> >
> > This button works fine but after the new file is created, the computer

> does
> > not have enough memory to move to another program like autocad for

example
> > which
> > may have been already open.
> >
> > Is there something that I should be doing to close thing or release some
> > thing so that this
> > doesn't happen.
> >
> > the code includes:
> >
> > Private Sub Command37_Click() 'SAVE TO FILE
> > On Error GoTo Err_Command37_Click
> >
> > Dim DTE, FLNAME As String
> >
> > Me![E LETER DATE].Format = "MM-DD-YY"
> > DTE = CStr(Format(Me![E LETER DATE], "MM-DD-YY"))
> > FLNAME = Me![JOB NUMBER] & " COVER LETTER " & DTE & ".RTF"
> >
> > 'MsgBox FLNAME
> > If MsgBox("SAVING LETTER TO " & Chr(13) & Chr(10) & FLNAME & " IN MY
> > DOCUMENTS" & Chr(13) & Chr(10) _
> > & "TO PROCEED CLICK OK, TO CHANGE FILE NAME OR CANCEL CLICK
> > CANCEL", vbInformation + vbOKCancel, _
> > "SAVE TO FILE") = vbOK Then
> >
> > DoCmd.OutputTo acReport, "COVER LETTER", acFormatRTF, FLNAME, False
> >
> > Else
> > DoCmd.OutputTo acOutputReport, "COVER LETTER", acFormatRTF, , False
> > End If
> >
> > DoCmd.CLOSE acReport, "cover letter"
> > Me!SAVED = True
> >
> > Exit_Command37_Click:
> > Exit Sub
> >
> > Err_Command37_Click:
> > MsgBox Err.DESCRIPTION
> > Resume Exit_Command37_Click
> >
> > End Sub
> >
> > NOTE AGAIN THAT the code executes perfectly well, just have a problem

with
> > memory afterwards
> >
> > thanks
> >
> >

>
>





 
Reply With Quote
 
Pat
Guest
Posts: n/a
 
      4th Aug 2003
There are 5 or 6 people who would regularly use this
operation using Windows 98 through Windows Xp.
They're all connected to an HP laser printer, but when
using this command button, they don't print or even preview the report,
I know that the report has to opened and formatted etc, that's why I thought
that closing it might help, but it doesn't seem to.


"JohnFol" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> It sounds like a memory leak with the report and not the code. You could
> eliminate the code completely by using the database window.
>
> I know that Access used to have a memory leak with lines on reports, but I
> though this was fixed around Acc95.
> Apart from that it tends to be OS / Printer driver. What OS are you using
> and which printer?
>
>
>
>
> "Pat" <(E-Mail Removed)> wrote in message
> news:53TWa.44967$(E-Mail Removed)...
> > I have a form that allows the user to create a report/letter
> > which can be previewed or printed with no problem.
> >
> > I also have on the form a button that will output the report in rtf

format
> > to
> > a word document that the user can save on his computer.
> >
> > This button works fine but after the new file is created, the computer

> does
> > not have enough memory to move to another program like autocad for

example
> > which
> > may have been already open.
> >
> > Is there something that I should be doing to close thing or release some
> > thing so that this
> > doesn't happen.
> >
> > the code includes:
> >
> > Private Sub Command37_Click() 'SAVE TO FILE
> > On Error GoTo Err_Command37_Click
> >
> > Dim DTE, FLNAME As String
> >
> > Me![E LETER DATE].Format = "MM-DD-YY"
> > DTE = CStr(Format(Me![E LETER DATE], "MM-DD-YY"))
> > FLNAME = Me![JOB NUMBER] & " COVER LETTER " & DTE & ".RTF"
> >
> > 'MsgBox FLNAME
> > If MsgBox("SAVING LETTER TO " & Chr(13) & Chr(10) & FLNAME & " IN MY
> > DOCUMENTS" & Chr(13) & Chr(10) _
> > & "TO PROCEED CLICK OK, TO CHANGE FILE NAME OR CANCEL CLICK
> > CANCEL", vbInformation + vbOKCancel, _
> > "SAVE TO FILE") = vbOK Then
> >
> > DoCmd.OutputTo acReport, "COVER LETTER", acFormatRTF, FLNAME, False
> >
> > Else
> > DoCmd.OutputTo acOutputReport, "COVER LETTER", acFormatRTF, , False
> > End If
> >
> > DoCmd.CLOSE acReport, "cover letter"
> > Me!SAVED = True
> >
> > Exit_Command37_Click:
> > Exit Sub
> >
> > Err_Command37_Click:
> > MsgBox Err.DESCRIPTION
> > Resume Exit_Command37_Click
> >
> > End Sub
> >
> > NOTE AGAIN THAT the code executes perfectly well, just have a problem

with
> > memory afterwards
> >
> > thanks
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory causing problems Derk DIY PC 11 5th Feb 2008 04:33 PM
Strange problem - page output contains output from another request Paul Microsoft ASP .NET 1 10th Apr 2007 05:41 PM
Strange problem - page output contains output from another request paul.hester@gmail.com Microsoft Dot NET 0 10th Apr 2007 04:44 PM
system process causing spdif output hiccup =?Utf-8?B?c3VuYmlyZA==?= Windows XP General 5 19th Apr 2006 08:48 AM
Memory causing reboots? Chris Stolworthy Computer Hardware 5 16th Jan 2004 06:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 PM.