Save Tag property on Close?

B

bhammer

Why can't I do this?

Private Sub Form_Close()
Me.txtSourceFolder.Tag = Me.txtSourceFolder
End Sub

....then...

Private Sub Form_Open(Cancel as Integer)
Me.txtSourceFolder = Me.txtSourceFolder.Tag
End Sub

It doesn't seem to save the Tag when the form is closed.

How can I make the Opening form load the previous txtSourceFolder string?

-Brad
 
A

Allen Browne

Properties you set at runtime (not in design view) won't be saved.

An alternative is to save the properties you want into a table in
Form_Unload, and then assign them again in Form_Load.

Here's an example of that kind of approach:
Return to the same record next time form is opened
at:
http://allenbrowne.com/ser-18.html
The purpose is different, but the technique is the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top