-
How to Create/Attach a LOGFILE in Microsoft Access
Hi!
Can any one help me out... i want to create a Log File for my Access database,, i dont know where to start.,,
Kind Regards
Andrew
NB: i'll appriciate your support..
Last edited by bazo; 05-24-2006 at 03:42 AM.
Reason: To be more clear on what i've asked
-
You need to use VB to create a function that will write out your log file. There is a built-in VB object (FileSystemObject) that can be used to open, read and write to files.
Here is a simple example from the Help files built into Access 2002:
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)
a.WriteLine("This is a test.")
a.Close
Here is an example of reading in a preexisting file:
Sub OpenTextFileTest
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("c:\testfile.txt", ForAppending,TristateFalse)
f.Write "Hello world!"
f.Close
End Sub
Similar Threads
-
Replies: 4
Last Post: 04-14-2006, 09:09 AM
-
Replies: 0
Last Post: 04-04-2003, 05:13 PM
-
By Steve Oliver in forum VB Classic
Replies: 0
Last Post: 07-26-2002, 12:30 PM
-
By Steve Oliver in forum VB Classic
Replies: 0
Last Post: 07-25-2002, 04:29 PM
-
Replies: 1
Last Post: 11-27-2001, 06:53 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks