Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Text Files

Status
Not open for further replies.

DaveSH

Technical User
Aug 21, 2000
62
US
I would like to display the contents of a text file (read only) in a scrolling text box on a form. I dont want to store the text in the database, just have it display in the form when viewing the associated record. I do want to print the data in reports probably while the record is displayed. I cant seem to figure out how to use The Transfer Text action for this purpose (and Im not sure if that is the right way to do it).

Currently I have the files linked as OLE objects and the user can view them in word pad.

PS: Also I eventually intend to write the text files out the serial port. I have seen 3rd party addins that are alittle pricy any suggestions regarding accomplishing this task would be appreciated.
 
Well then you have to call the Document somehow and make your unbound text box equal to it.

Me!text1 = YourOLEField
 
Doug, thanks for the response,

This was my original approach, but I couldnt get it to work. What am I doing wrong?

I have a bound OLE Frame on my form called "MyFrame" with its control source a table field. I have a command button that prompts the user to link the .txt file to the OLE field using insert object. I have a text box called "FinalDestination" and a command button called "GetItThere" that has code Me![FinalDestination] = Me![MyFrame] in its on click event.

I get the text in the text box but it contains a bunch of unreadable characters. The only readable text seems to be the file name, the icon file and "courier". I didnt know if this was package definition stuff or if the MS Word Filter was automaticaly being used to view text files or something.

How can I get just the text.

Thanks a bunch for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top