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!

losing value in text box on form close

Status
Not open for further replies.

Actuary2B

IS-IT--Management
Jan 30, 2007
7
US
Evening all. I have a form that has a text box. The default value setting in it is "c:\".

The user is supposed to be able to enter "d:\" They can but...when they leave that box and run a macro, the macro first closes the form and reopens it and the default value is back, not "d:\". How can I save the value or change the default based on what they type?

I think the answer lies with SetValue but I'm stumped.

Thanks!
 
An Access form cannot remember anything that a user enters. You can make it bound to a table so it can remember. Or you can assign the value "d:\" to an global variable.

Seaport
 
How are ya Actuary2B . . .
Actuary2B said:
[blue]I think the answer lies with SetValue but I'm stumped.[/blue]
No! . . . the [blue]saving of non-volatile defaults[/blue] can only occur in [purple]form design view![/purple]

What you need to do is hold the entered value and restore it as default when you open the form again. However, I don't think this can be accomplished with macro . . . Hence your problem!

Since its hard to display a macro in a post . . . can you attempt to do so?

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top