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

How to save a label's caption that is dynamically assigned ?

Status
Not open for further replies.

halx

Programmer
Jun 5, 2002
35
FR
Hello,

I have a form that contains among other things a label whose caption changes according to what the user does.
(ie: when it is necessary, I update the label's caption with the command: me.lblMyLabel.caption = "qwerty")

When I close the form and open it again, the label
is blank.

How can I force the label to keep its latest caption, when the form is closed (and then reopened)?

Thanks

Alex
 
Create a table of all the possible captions determined by a user's actions, each with it's own ID. Have another table based on your user's profile, or some other specific that changes. In this second table save the ID of the caption that you want the user to see.

On the open of the form, look at the ID in the table and assign the respective caption.
 
Hello,

Thanks a lot !
I have done it and it works perfectly

(though I hoped there was something simpler)


Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top