Solved

Saving Data Like A Log Book

Posted on 1999-01-16
5
146 Views
Last Modified: 2010-05-03
How do you save data(text) so it can be loaded later for further referance. Like a sports log book?
0
Comment
Question by:gordolove
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:traygreen
ID: 1469047
The data can be saved either in a database, flat file or binary file
Are you looking for a simple file solution?
0
 
LVL 3

Expert Comment

by:traygreen
ID: 1469048
a simple ascii text file example
Private Sub WriteRecord(pName As String, pSport As String, pPosition As String)
   Open "c:\temp.txt" For Output As #1
   Write #1, pName, pSport, pPosition
   Close #1
End Sub
0
 

Author Comment

by:gordolove
ID: 1469049
I keep getting error messages when I try the string. I am new at this, so what do I have to custimize to get it to work?
0
 
LVL 1

Accepted Solution

by:
carlosvs earned 100 total points
ID: 1469050
If you need a log file try this:
sub WriteLog(LFile as String,LogTitle as String, LogText as String)
     Open LFile For Append As #1
     print #1, LogTitle & ": " & LogText
     close #1
end sub

example:
WriteLog "C:\MyFile.txt","Start UP","The Aplication Start"
This program will append to the Lfile...
0
 
LVL 1

Expert Comment

by:carlosvs
ID: 1469051
if you need to see your log in a form try
Rich Textbox Control.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now