Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Snapshot Viewer - Memory problem 2

Status
Not open for further replies.

Kariera

Programmer
May 27, 2004
9
US
I can not for the life of me figure out what my problem is with Snapshot viewer. I am using it to output some reports and I randomly get the error "can not create report, there is not enough free disk space." There is MORE than enough free disk space. And what is stranger is that there seems to be no pattern to it. I can log on tomorrow and it will be gone. Does anyone know the cause of this or how to fix it? I've looked through many articles, but not have been able to address this. THANKS!
 
Hi, your problem is more than likely in the syntax you are using to export the snapshot. That is the error I see when I get the syntax wrong.

Here is an example that works:

DoCmd.OutputTo acOutputReport, "rptWorklistCondensed", acFormatSNP, "C:\Snapshots\CondensedWorklist" & " - " & Format(Date, "mmmm dd") & "-" & Format(Time, "mmss") & ".snp"

HTH
 
Just curious - what was the syntax when you were getting errors? The difference between your syntax and mine was that I was using "Snapsot format" instead of acFormatSNP. I haven't gotten the error since I changed the syntax, but it has popped up without any pattern that I can tell...
 
The error was in putting the string for the file name together. I think it was in the date or time format. I spent a couple days with the memory error problem, which didn't make any sense and then started taking parts out of the string until I found the problem.
 
I never would have thought of that. THANKS!
 
I tried parsing the string as you did and I am still getting the same error. Any other ideas?
 
Here it is:

*******************
valProposal = Forms![frm_Prp_Proposal].ProposalDescription

valDate = Format(Date, "mmm dd")

valTime = Format(Time, "mmss")

myPath = "C:\Program Files\Reports\"

valSummaryFileName = valProposal & "-Summary-" & valDate

valSummaryFileLocation = myPath + valSummaryFileName & "-" & valDate & "-" & valTime & "-" & ".snp"

DoCmd.OpenReport "rpt_RunDate", acViewPreview, , , acHidden

DoCmd.OutputTo acOutputReport, "rpt_RunDate", "Snapshot format", valSummaryFileLocation, False

**********

I'll also tried formatting the date/time as follows:
valDate = Format(Date, "mmddyy")
valTime = Format(Time, "hhnnss")

This does work some of the time. I will have people try and create these files with no problem at all, but then 5 minutes later, they can't create the same file. I'm at a loss.
Any suggestions would be great, thanks!
 
Hi, worked fine for me except that if the intent is to output a snapshot I changed

'DoCmd.OpenReport "rpt_RunDate", acViewPreview, , , acHidden

to

DoCmd.OutputTo acOutputReport, "rpt_RunDate", acFormatSNP

You might give that a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top