View Single Post
  #4  
Old January 4th, 2010, 06: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