Article View: comp.databases.ms-access
Article #200Re: replacing text during output
From: Graham Mandeno
Date: Sun, 23 May 2004 21:37
Date: Sun, 23 May 2004 21:37
27 lines
2214 bytes
2214 bytes
You can use the Replace function to change all the quotes as required:
Replace( [FieldName], "'", "\'" )
You didn't say *how* you were writing to the file, but if it's using VBA
file Print# then you can use store the Replace result in a temporary string
variable and write that to the file. If you're using TransferText, then use
Replace in your source query.
--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
"asd987" <asd987@home.nl> wrote in message
news:c8qt02$gj6$1@news5.tilbu1.nb.home.nl...
> Hi,
>
> Ihave to print a field (type memo) to a file. I know how to do that ;-),
but
> there's one complication: all single quotes (') in the record must be
> replaced by <backslash> + <single quote> (\') before (or during) printing
to
> the file. How do I do this?
>
> Thanks.
>
>
Technical Details
Message-ID:
<#TN0T4QQEHA.1388@TK2MSFTNGP09.phx.gbl>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gblReferences:
<c8qt02$gj6$1@news5.tilbu1.nb.home.nl>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff0ac,c41e65930be7d568 X-Google-Thread: 102b1d,c41e65930be7d568 X-Google-Thread: 11387c,c41e65930be7d568 X-Google-Thread: 111a5a,c41e65930be7d568 X-Google-Thread: 101bdd,c41e65930be7d568 X-Google-Thread: fe218,c41e65930be7d568 X-Google-Thread: 1128b1,c41e65930be7d568 X-Google-Thread: 113a89,c41e65930be7d568 X-Google-Attributes: gidff0ac,gid102b1d,gid11387c,gid111a5a,gid101bdd,gidfe218,gid1128b1,gid113a89,public From: "Graham Mandeno" <Graham.Mandeno@nomail.please> References: <c8qt02$gj6$1@news5.tilbu1.nb.home.nl> Subject: Re: replacing text during output Date: Mon, 24 May 2004 09:37:01 +1200 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <#TN0T4QQEHA.1388@TK2MSFTNGP09.phx.gbl> Newsgroups: comp.databases.ms-access,de.comp.datenbanken.ms-access,dk.edb.database.ms-access,es.comp.bd.ms-access,microsoft.public.access.forms,microsoft.public.access.formscoding,microsoft.public.office.access.forms,microsoft.public.office.access.formscoding NNTP-Posting-Host: 203-118-172-237.adsl.ihug.co.nz 203.118.172.237 Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl