[AccessD] Set text box default value to nothing

Jim Dettman jimdettman at verizon.net
Mon Jan 24 14:01:44 CST 2011


Susan,

  Watch out on the form Open Event.  Controls may or may not exist yet.  If
you really need to use that event (because it is cancelable), then issue a
Me.Repaint before trying to work with any control.

 If you don't care about the ability to cancel, then work with controls in
the OnLoad event.  At that point, all controls have been created.

Jim. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Monday, January 24, 2011 02:18 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Set text box default value to nothing

Lambert, it works if I move the code to the form's Open event, but good to 
know about the persistent thing -- will try to remember it. I had expected 
that since it was happening in real-time, that the new setting would _not_ 
be saved when the form closed. Not sure I understand why it is, but good to 
know just the same.

Susan H.


> Default value is most certainly persistent, nothing temporary about it.
>
> Then only way you can make this change, in code, AFIK, is to open the form

> in design mode, make the change to the default value property on the text 
> box, and then save the form. None of which you can go in an MDE file.
>

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list