Form_VirtualTextForNull |
Post Reply |
Author | |
A.D. Tejpal
Microsoft MVP Joined: 30 Jun 2008 Status: Offline Points: 192 |
Post Options
Thanks(0)
Posted: 07 Jun 2010 at 10:00am |
Form_VirtualTextForNull In certain situations, it might be considered desirable to display a meaningful text in a form control in case of Null value, without compromising the Null value status (which would otherwise stand vitiated by assignment of a default value). This sample db demonstrates a simple technique for achieving the above objective. This is done by manipulation of control's format property and has the advantage that the required information gets displayed without disturbing the value actually held by the control (i.e. Null or otherwise). Either of the following styles can be used for assigning the format property: With the above approach, whenever the control happens to be blank, it will display the desired virtual text. In this state, if the user clicks into the control, the virtual text disappears, making it very convenient to make a new entry. In case of a combo box where first column is not hidden, direct assignment as per (a) above is found adequate. However, very often, the first column width is kept zero. In that case, for proper effect, it is found necessary to manipulate the format property via code. In this sample db, demos are provided for the following: Version: Access 2000 File Format Reference: Nothing Extra Download >>: uploads/37/Form_VirtualTextForNull.zip |
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |