A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unbound text control, read from/write to text file



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2010, 02:45 PM posted to microsoft.public.access.forms
Song Su[_4_]
external usenet poster
 
Posts: 31
Default Unbound text control, read from/write to text file

How to have unbound txtMailBody read content from a txt file and write to a
txt file? I want user to have his own default content of email body which is
from last time he run it.

Thanks

  #2  
Old January 4th, 2010, 04:12 PM posted to microsoft.public.access.forms
Dorian
external usenet poster
 
Posts: 542
Default Unbound text control, read from/write to text file

Why not use a table instead of a text file? Access is designed to use tables.
To use a text file you need to reference the File System Object. Google it to
find out the details of using it.
Since the control is unbound you can read the data in the Current event
based on the primary key of your table record.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"Song Su" wrote:

How to have unbound txtMailBody read content from a txt file and write to a
txt file? I want user to have his own default content of email body which is
from last time he run it.

Thanks

  #3  
Old January 4th, 2010, 04:58 PM posted to microsoft.public.access.forms
Song Su[_4_]
external usenet poster
 
Posts: 31
Default Unbound text control, read from/write to text file

The application is designed to be shared with many users and I want each
user has his own default content. That's why I cannot use table. I'll check
out File System Object.

"Dorian" wrote in message
...
Why not use a table instead of a text file? Access is designed to use
tables.
To use a text file you need to reference the File System Object. Google it
to
find out the details of using it.
Since the control is unbound you can read the data in the Current event
based on the primary key of your table record.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and
they
eat for a lifetime".


"Song Su" wrote:

How to have unbound txtMailBody read content from a txt file and write to
a
txt file? I want user to have his own default content of email body which
is
from last time he run it.

Thanks

  #4  
Old January 4th, 2010, 07:47 PM posted to microsoft.public.access.forms
Mike B[_4_]
external usenet poster
 
Posts: 2
Default Unbound text control, read from/write to text file

You would be better off using VBAs native file handling to open and read a
text file vs the FileSystemObject.

The FileSystemObject is a part of Windows Scripting and may not be
accessible on all computers due to Security Settings notwithstanding most
developers eschew its' use because of the several variations (versions) of
the Scripting Runtime that may not be 100% compatible with your code,
whereas VBA will always work.

I have used the FileSystem Object, but only in the Scripting environment.


"Song Su" wrote in message
...
The application is designed to be shared with many users and I want each
user has his own default content. That's why I cannot use table. I'll
check out File System Object.

"Dorian" wrote in message
...
Why not use a table instead of a text file? Access is designed to use
tables.
To use a text file you need to reference the File System Object. Google
it to
find out the details of using it.
Since the control is unbound you can read the data in the Current event
based on the primary key of your table record.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and
they
eat for a lifetime".


"Song Su" wrote:

How to have unbound txtMailBody read content from a txt file and write
to a
txt file? I want user to have his own default content of email body
which is
from last time he run it.

Thanks



 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.