Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 10th, 2004, 02:51 AM
millsy millsy is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: New Plymouth, New Zealand
Posts: 3 millsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question outputting reports to .rtf format from access

Hey there guys,

Question here for all you Access gurus.

Im currently building a reporting system based around an access database, and this involves outputting said reports to word-compatible files in Rich Text Format.

Trouble is, when I run the code (by clicking a button on a form, the file is generated, but said action crashes access. Any idea what the problem may be??

Heres the line of code that is causing me great greif:

DoCmd.OutputTo acReport, stDocName, acFormatRTF, Outfile, OpenView

Outfile refers to a variable that is the name and path of the report that is outputted, and openview is a true/false variable that set whether the file should be opened for viewing or not (btw: same problem occurs when openview is true AND false.)

Thanks,
Brendon

Reply With Quote
  #2  
Old August 10th, 2004, 04:18 AM
ineuw ineuw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 82 ineuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 28 sec
Reputation Power: 5
Check if the Office .dll library is installed in References and test it again. If it still doesn't work, perform 2 more tests. 'Publish' the data from an Access report via Office tools, by selecting 'Publish it with MS Word' (the output is .rtf). The path can be specified in Options\General\Default database folder. Then, test the variables that when strung together, they are correct. This process of elimination will track down the error.

Reply With Quote
  #3  
Old August 10th, 2004, 05:53 AM
millsy millsy is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: New Plymouth, New Zealand
Posts: 3 millsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No luck

Quote:
Originally Posted by ineuw
Check if the Office .dll library is installed in References and test it again. If it still doesn't work, perform 2 more tests. 'Publish' the data from an Access report via Office tools, by selecting 'Publish it with MS Word' (the output is .rtf). The path can be specified in Options\General\Default database folder. Then, test the variables that when strung together, they are correct. This process of elimination will track down the error.

OK...I did that...and It still did it, however, I noticed that it happened when I had the forms running - all of which have VBA code sitting behind them.

I checked out the event viewer and found this sitting there...

Faulting application msaccess.exe, version 10.0.2627.1, faulting module msaccess.exe, version 10.0.2627.1, fault address 0x00035c0b.

Reply With Quote
  #4  
Old August 10th, 2004, 09:45 AM
ineuw ineuw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 82 ineuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 28 sec
Reputation Power: 5
Could you upload a zipped sample database? I would like to see the code behind the forms, if possible. I found the a posting on another website with the identical error codes from the Event log. The advice given there is to reinstall Office, but I doubt that. I suspect that the error may be in the code, or more likely in the rtf converter. I would like to replicate the error at work where I have clean setups on several workstations, Win2K and XP. Otherwise, I won't be home for another 7 hours. It is now 10:30am EST, Canada.

Reply With Quote
  #5  
Old August 17th, 2004, 06:36 AM
millsy millsy is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: New Plymouth, New Zealand
Posts: 3 millsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well I figured it

Turns out, all I had to do was go into report properties, and change the Modal and Popup flags to 'no'.....works fine now..

Thanks for your assistance all the same....have a good one..

One of those STLT'S (Stupid Little Things)

Reply With Quote
  #6  
Old August 25th, 2004, 02:43 AM
snowmanapril snowmanapril is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 snowmanapril User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
May I know how you solve?

U saying go to report properties, pop up set to no?

I am using MS Access 97, I dun see such option in access report.

However I encounter the same error message in windows 2003 server environment with MS Access 97 install.

Reply With Quote
  #7  
Old August 25th, 2004, 04:39 PM
ineuw ineuw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 82 ineuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 28 sec
Reputation Power: 5
For snowmanapril: It is not the report but the form's modality that has to be set to "No". (Form properties Modal = No).
For milsy: The popup property will not prevent you from viewing or exporting the .rtf file, but the best way is to hide the form using the report's On open event, while prviewing/printing the report and using the report's On close property to re-display the form.

Reply With Quote
  #8  
Old September 1st, 2004, 01:34 AM
snowmanapril snowmanapril is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 snowmanapril User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

my access juz using query and report without using form.
I still get error faulting msaccess.exe, no matter how many times i
reinstall the office 97

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > outputting reports to .rtf format from access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT