Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to write text file

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Microsoft Access Table Record Limitation  
Author Message
SF

External


Since: Dec 21, 2009
Posts: 1



(Msg. 1) Posted: Sun Dec 20, 2009 10:25 pm
Post subject: How to write text file
Archived from groups: microsoft>public>access (more info?)

Hi,

How to wrote a field (memo) content to a text file. Before write to text
file I want to remove the <div> ,</div>. How to do that?

SF

 >> Stay informed about: How to write text file 
Back to top
Login to vote
Ordi maison

External


Since: Dec 21, 2009
Posts: 1



(Msg. 2) Posted: Sun Dec 20, 2009 10:25 pm
Post subject: Re: How to write text file
Archived from groups: per prev. post (more info?)

"SF" a écrit dans le message de

> Hi,
>
> How to wrote a field (memo) content to a text file. Before write to text
> file I want to remove the <div> ,</div>. How to do that?
>
> SF
>parler francais ou espagnol

 >> Stay informed about: How to write text file 
Back to top
Login to vote
Tom Wickerath

External


Since: Nov 26, 2008
Posts: 30



(Msg. 3) Posted: Sun Dec 20, 2009 10:25 pm
Post subject: RE: How to write text file
Archived from groups: per prev. post (more info?)

Hi SF,

Are you using Access 2007, with the .accdb file format, and a rich text
formatted memo field? The reason I ask is your mention of <div> and </div>
tags. Here is one method that I think will work, but I only tested it using
Access 2003:

Create a new query that includes your memo field. Here is an example for the
sample Northwind database, using the Employees table and the Notes field:

SELECT Trim(Replace(Replace([Notes],"<div>",""),"</div>","")) AS NewNotes
FROM Employees;

You can then export the query to a text file. In Access 2003, you would use
File | Export. Alternatively, you can create a new stand-alone module, and
paste in the following function:

Option Compare Database
Option Explicit

Sub WriteMemo()
On Error GoTo ProcError

DoCmd.TransferText TransferType:=acExportDelim, _
TableName:="qryMemoExport", _
filename:=CurrentProject.Path & "\Memo.txt", _
HasFieldNames:=True

MsgBox "Done.", vbInformation, "Memo Field Exported..."

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure WriteMemo..."
Resume ExitProc

End Sub

'------------------------------------------------

Save the module as basMemoExport. Now try running the WriteMemo subroutine,
by having your cursor anywhere within this procedure and then pressing the F5
key.


Tom Wickerath
Microsoft Access MVP
[URL="http://www.accessmvp.com/TWickerath/"]http://www.accessmvp.com/TWickerath/[/URL]
__________________________________________

"SF" wrote:

> Hi,
>
> How to wrote a field (memo) content to a text file. Before write to text
> file I want to remove the <div> ,</div>. How to do that?
>
> SF
 >> Stay informed about: How to write text file 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Error importing text file into Access - I keep getting this error message: The specification XML failed to validate against the schema. There is an error in the following line of XML document: |. Help!

remove character from text - What would the VB code be to if i type the following text into txtbox1 'GHY1048573850001' i when i exit it i would like it to remove the first 3 character and last 4 character and dispay it it in txtBox2 So the text will look like '104857385' Thanks

Color Text Box - I have a check box and a text box. How to I make it so when my check box is checked (or=Yes), my text box is yellow? Thank you very much! -Scott Channell

Show in a lebel or text M^3 - I want in the report labels and texts as Post Scripts Cubic Meters as M^3. We can do in MS Excel. Is any way to use in Access

Want to change colors of text items in reports - In a database I have a field with a drop down box that has 3 possible text answers. When one of these answers is selected, I would like to have a different color for each answer in the report. Example: Priority code with a selection of 1, 2, 3. In the...
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]