Use a message box to change to default value of a control.

I'm looking for a block of code that allows an end-user to permanently change the default value of a form control Me.txtName via whatever value is typed in an input box.

I've searched high and low on the internet, and have not found anything that would accomplish this.  As soon as the form is closed, the default value reverts back to what I manually set in the default properties window.

Any help is greatly appreciated.
KP_SoCalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Why not store that inputted value in a 'defaults' table, then grab the value from this table when the Form loads, then set the text box default value on the fly.
(Conceptual idea)
The way you are trying to do this now would require you open the Form in Design view and Save.

mx_SoCal
:-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Martin LissOlder than dirtCommented:
In Excel you can use Application.Names.Add and the Evaluate method to store and recall values within the application, but assuming that that doesn't apply to Access then depending on the OS you can save and recall the value from an Access table, ini file, regular text file or the Registry. Since this is Access the Access table seems to be the natural choice.
0
KP_SoCalAuthor Commented:
I didn't think it was possible either without going in to Design View.  I thank you both for pointing me in the right direction on this.
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Just curious ... and this is certainly not a big deal of any kind, but ... the Accepted Answer talks about Excel ... the concurs with what I said about using a Table ... so, just wondering why you didn't reverse Accepted  and Assisted ?

mx
0
KP_SoCalAuthor Commented:
Sorry, I didn't even notice their was an "Accepted" and "Assisted".  My mistake.
0
Martin LissOlder than dirtCommented:
Yes I agree. You should get most if not all of the points since, while I didn't notice it when I posted, you were first.
0
Martin LissOlder than dirtCommented:
'Request Attention' and the moderators will reopen the question.
0
KP_SoCalAuthor Commented:
Ok, I'm requesting the moderator to open.  My apologies for the mix-up.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
No need to reopen ...

mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
And my comment had nothing to do with points :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.