[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Saving Data Like A Log Book

How do you save data(text) so it can be loaded later for further referance. Like a sports log book?
0
gordolove
Asked:
gordolove
  • 2
  • 2
1 Solution
 
traygreenCommented:
The data can be saved either in a database, flat file or binary file
Are you looking for a simple file solution?
0
 
traygreenCommented:
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
 
gordoloveAuthor Commented:
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
 
carlosvsCommented:
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
 
carlosvsCommented:
if you need to see your log in a form try
Rich Textbox Control.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now