Save Tag property on Close?

  • Thread starter Thread starter bhammer
  • Start date Start date
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
 
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.
 
Back
Top