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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OutPutTo under Access XP

Status
Not open for further replies.

Lloyd1313

IS-IT--Management
May 20, 2002
20
0
0
CA
I have a program that works fine under Access 2000, my client has purchased some new computers with Access XP on them and the OutPutTo command doesn't work under the new version.

The line of code looks as follows:
DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF, sPath & sStudent & "Acceptance.rtf"

In XP the constant acReport has been changed to acOutPutReport, I've tried it both ways and neither works. Everything seems to work fine, I even get the message that it is writing the files but it doesn't write them.

Any suggestions would be greatly appreciated.

Lloyd.
 
Lloyd,

Have you had any luck with this? I am running into the same issue.

DB built in 2000, now upgrading systems to XP.
I tried running it in XP, crashed first time and received MS Access error. It now runs, and I get the output message that report is printing, and then nothing. Just stops. No error, no outputted report.

I've changed some of my code to Docmd.Sendobject instead, but it doesn't seem to be firing all the time - just skips over it (which I ran to in development and is why I went to the OutputTo command instead)

Thanks, Janel
 
G'd afternoon for both.

Lloyd:
I really would like to see how did you build the sPath & sStudent strings, because i have office 2k2 and the first part acOutputReport, stDocName, acFormatRTF, works just fine, (i used the button wizard), what make me think that the problem, can be in the string.
About the different OS's: As far as i know the difference that matter for us when working with different OS's are the ADO libraries (i'm not sure about dao because i don't use to work with it too often) and the new structure in XP for the regional settings. Far from that the Office behavior (for me) seems to be the same regardless of the OS.

anasazii:
Try rebuilding the command button using the wizard, or create a new db and import the objects. And if that does not solve your problem think of re-install or Repair your MS Office installation. It looks like a db corruption or wrong MS Office Installation.

Good luck for both

Estuardo

 
Estuardo,

Thank you for your reply. I have figured out (hopefully) what my problem was. I had extra references set that were interferring. I went in and removed the following - "Windows Common Controls 6.0" and "Windows Script Host Object Model". I'm not sure what either one do. I think I just added them during development when I was trying out different pieces of code, and just never removed them. Report now outputs to file fine.

Thanks,
Janel
 
Janel:
I thank YOU for the feed back, is the first time (in long long time) i see this kind of behavior. Before your reply i thought Access handle the situation by itself, i mean the references to avoid exactly that crossover.
I'm glad you found the solution, but more than anything the source of the problem.

Cheers!!!

Estuardo
 
I checked my database and those references are not selected. Is there anything else you changed ?

Lloyd.
 
Sorry, I believe that was all I changed...My statement that I have looks about the same as yours also, except I'm using variables for my report names...

docmd.outputto acoutputreport, srptname, acformatSNP, stemprptname, false

Do you have all the correct permissions to the drive you're trying to outputto?
 
As long as I run Access 2000 there is no problem with the output, I only have a problem if I want to run it under 2002. This wouldn't work either if the permissions were a problem.

Lloyd.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top