Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

How to populate a label from text file.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GA - 29 May 2005 18:02 GMT
Would some kind soul help me out with this please.

I want to display the text from a text file in an unbound control on
my main form. The purpose is to display the establishment using the
database.

The front end and back end plus are in the same directory with the
text file which is created by my installer which. Details of the
establishment are collected during the install and then written to the
text file.

TIA - GA
GA - 29 May 2005 18:42 GMT
Dohhh....

As soon as I hit the send button it dawned on me that I could just
link to the file as a table.

I was looking for a complicated solution when a simple one existed 8^)

GA
Marshall Barton - 29 May 2005 20:20 GMT
>I want to display the text from a text file in an unbound control on
>my main form. The purpose is to display the establishment using the
[quoted text clipped - 4 lines]
>establishment are collected during the install and then written to the
>text file.

Here's a form Load event procedure that loads a text box
with the contents of a text file:

Private Sub Form_Load()
Dim file As Long
Dim buf As String
Dim path As String
Dim filesize As Long
    file = FreeFile()
    path = "D:\path\file.txt"
    filesize = FileLen(path)
    Open path For Input As file Len = filesize
      buf = input(filesize, file)
      Me.Text0 = buf
    Close file
End Sub

Signature

Marsh
MVP [MS Access]

GA - 29 May 2005 22:01 GMT
Many thanks Marshall.

GA

>>I want to display the text from a text file in an unbound control on
>>my main form. The purpose is to display the establishment using the
[quoted text clipped - 21 lines]
>    Close file
>End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.