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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file does not open after file save

Status
Not open for further replies.

mettodog

Vendor
Jul 11, 2000
94
US
i have a form called file list. it is a small form with a filelist(1) a command button (openfile) and a hidden text1.text. whenever a file is selected text1.text displays the loacation, it adds Edits\ behind it so it would appear as Edits\myfile.file. you click open, it opens up a window with that file in it. the window that is open has the code to find the file and everything (me.txtarea.loadfile filelist.text1.text) this works fine. BUT- when you make a new file, and it saves it in Edits\ of course, and you select the file in the filelist, and click open, it gives an error saying that the path can not be found, it hilights this code "Me.TxtArea.LoadFile FileList.Text1.Text" What is going on??
 
You did not say whether the text1 control was a textbox or a rich text box. As far as i know the savefile and loadfile methods only work for rich text boxes.

PK Odendaal
pko@mweb.co.za

 
text1 is a text box. text 1 only serves as telling the rtf box the path and filename of the file it is to open.
 
it seems like you are saying that Filelist and Text1 are 2 seperate controls. if this is the case then why are you using
Code:
FileList.Text1.Text

This doesnt make sense. Should it be
Code:
Me.TxtArea.LoadFile Text1.Text
instead? Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
text1 one is on a form callde filelist. txtarea is on a totally seperate form.
 
ok, i understand now. If you were to look at the edits directory in explorer is the file there? can you open it using notepad or wordpad? I would also be interested to see the code that is being executed to save the file. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
its an rtf file, it works before you save something to that directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top