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, 09:45 AM
keeko keeko is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 keeko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Writing Text Files with Access 97

Hi All,

I'm trying to output a field of an Access form as a text file, using the following:

Private Sub OutputTxtfile_Click()
Dim strFilename As String

strFilename = strFilename & Me.Issue_Number
strFilename = strFilename & ".sh"
Open strFilename For Output As #1
Write #1, Me.Script
Close #1
MsgBox ("Textfile " & strFilename & " written to Desktop")
End Sub


It works fine, except the text in the file is surrounded by double quotes and any double quotes in the textfile are doubled up, ie:

"sqlplus -s $1 1> /dev/null <<endsql
-- Identify LAHRA Cancelled Claims
-- IK created 13/12/2002 (CANCLAIM)
-- IS rewritten for iWorld tables 29/03/2003 - bhb001.sh
CLEAR COLUMNS
CLEAR BREAKS
Clear Computes
TTITLE OFF
BTITLE OFF
COLUMN ""TODAY"" NOPRINT NEW_VALUE REPDATE
Column ""Claim"" format a9
Column ""Name"" format a20
Column ""Property Address"" format a50
etc.....

"

(note to clear up any confusion, the actual text I am outputting is OracleSQL)

Can anyone tell me how to stop the text from having these changes made?

Thanks

Reply With Quote
  #2  
Old August 10th, 2004, 12:02 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
Use the Print #1 command instead of the Write #1
The you won't have the quotes

Reply With Quote
  #3  
Old August 11th, 2004, 04:08 AM
keeko keeko is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 keeko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks very much

You've come up with the goods for me again! Many thanks.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Writing Text Files with Access 97


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 1 hosted by Hostway