Exporting to Wordpad/Notepad/Word etc (1 Viewer)

Patriot2711

New member
Local time
Today, 15:38
Joined
Aug 29, 2006
Messages
2
Hi,

I'm needing to export data from a form in Access 2000 to Wordpad or alike. I'm familiar with Call Shell("notepad.exe", 1) but my question is this: Can I export all of the data from a form (textboxes, dropdowns, radio buttons) in one statement instead of having to go thru each field on that form and writing a ton of individual statements? In other words, if my form has 30 fields (textboxes, dropdowns, etc) - does that mean I need to write 30 statements or can this be done by using just one statement (that would save a lot of time). Thanks.
 

RV

Registered User.
Local time
Today, 20:38
Joined
Feb 8, 2002
Messages
1,115
Export your data into a text file.
Open the text file using whatever applic you want to.

Search the forum, similar questions have been asked quite often.

RV
 

Patriot2711

New member
Local time
Today, 15:38
Joined
Aug 29, 2006
Messages
2
Yes, but my question is, how does the data get exported? Opening Wordpad is easy. Getting that data sent to wordpad via VBA code is what I'm looking for.
 

FireStrike

Registered User.
Local time
Today, 15:38
Joined
Jul 14, 2006
Messages
69
I don't know if this is what you want or not, but you can use something like

strFileName="filename.txt"
Open strFileName For Output As #1
Write #1, field1, field2, field3
Close #1

This will create a comma delimited txt file. you can then open it with whatever txt editor you like. I hope this helps, or at least gives you something to think about
 

RV

Registered User.
Local time
Today, 20:38
Joined
Feb 8, 2002
Messages
1,115
Have a look at the TransferText Method in Access Help.
Also, search the forum as similar questions have been asked 'bout a zillion times.

RV
 

Users who are viewing this thread

Top Bottom