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!

Default Value for a text box - A Bigger Problem

Status
Not open for further replies.

ChemistZ

Programmer
Oct 30, 2001
70
US
I have created a pop-up form that mimics an InputBox look. It asks a user to type in a certain number and of course it is starting out blank. I don't want to use the default value property of the text box because that is too static. What I would like is for the form to come up and for the text box to have whatever the last person typed into it in it unless it is the first time they open it that day. Can this be done?
 
How about setting up a public var in a module? I am not sure whether it is ideal, but it may work. Then on the On-Load of the 'Input Box' check whether the var has been initialised/assigned. If so, set the text box equal to it, otherwise leave empty. Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
When you say check to see if the public variable has been initialized/assigned - do you have sample code of that?

if pubvar is null?????
 
No Access in front of me but I will give it a go.

Try some of these. Hopefully 1 will work:

isNull(var)
var = ""

I am hopeless when I haven't got Acc in front of me. Try these. If not, let me know and I will have another think. Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top