[AccessD] An Interesting question

Drew Wutka DWUTKA at Marlow.com
Sun Mar 29 16:37:38 CDT 2009


Well on a new record, it would just be setting the default value.  But
if a field is null, isn't that a value in and of itself?  

See if you can follow my logic on this.  A default value sets a value in
a record automatically, if it is not changed.  If it is changed, then
the record isn't null, it's whatever the user selects (even if it's
blank, that's not null, that's an empty string).  So the null values
would only be for 'older' records, where the value wasn't selected (and
there was no default value).  Therefore, the solution would be to simply
set a default value (I would recommend it being set in the table
definition for that field), and then simply write some code, that would
check for nulls in the current recordset (OnCurrent event), that would
set any null field to the default value defined in the table def.  This
would effectively eliminate any null values in the underlying data, as
they are viewed in your form.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
at Beach Access Software
Sent: Sunday, March 29, 2009 4:23 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] An Interesting question

A client writes in to ask:

"Can combo boxes and text boxes be configured to display a pre-selected
text
if the field is null or the record is new.  For example, could the
fields on
the TimeSheet that have no labels have the "labels" show on the combo
box or
text box until a user enters something for that field? "

These are bound combos and text boxes.  I can think of a couple kludgey
ways
to do this - overlays with label text that are visible only if there's
nothing in the field would be one.  But is there a really good way?

MTIA

 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 

 
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list