Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Mon Jan 24 13:11:54 CST 2011
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. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, January 24, 2011 1:46 PM To: Access Developers discussion and problem solving Subject: [AccessD] Set text box default value to nothing I've tried the following to set a control's (text box) Default Value property setting to nothing, but it's not working: In the Form_Close event, I've used txtCreatedBy.DefaultValue = vbNullString txtCreatedBy.DefaultValue = "" Neither works. When I reopen the form, the control is still showing the previously-set Default Value. I want to wipe out the Default Value setting, close the file, and when reopened, have an empty control, because there is no Default Value setting. Any help? I'm setting this control's Default Value property using VBA -- the control's AfterUpdate event, so I can't figure out why the form is saving it to begin with. I expected this property to be temporary -- just while the form was open. I didn't anticipate this particular problem. Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com