[AccessD] Very interesting quirk in table design...

Drew Wutka DWUTKA at marlow.com
Tue May 13 21:37:55 CDT 2003


That's what I thought.  I always ran an update query afterwards, but this is
MUCH faster!  Of course it only sets the values to 0, so if the initial
values need to be something else it's not going to help.  (Of course that
would mean you have a calculated field......<grin>)

Drew

-----Original Message-----
From: Gary Kjos [mailto:garykjos at hotmail.com]
Sent: Tuesday, May 13, 2003 9:33 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Very interesting quirk in table design...


Cool shortcut to save an update query to initialize a new field. I'll have 
to try that sometime.

Gary Kjos
garykjos at hotmail.com





>From: Drew Wutka <DWUTKA at marlow.com>
>Reply-To: accessd at databaseadvisors.com
>To: "'AccessD at databaseadvisors.com'" <AccessD at databaseadvisors.com>
>Subject: [AccessD] Very interesting quirk in table design...
>Date: Tue, 13 May 2003 19:42:55 -0500
>
>I just noticed something tonight.  I had to go into an existing table and
>add a few fields.  One field was numeric, then I was going to add two 
>Yes/No
>fields.  I did this.  The numeric field was blank/null for all existing
>records.  However, I wanted a Yes/No/Not Answered for the Yes/No fields, so
>I dropped one of them, and changed the other one to a byte number (1-yes,
>2-no, 4-Yes, 8-No) which will let me know the answer for both and whether
>they were answered at all.  When I looked back at the datasheet view, the
>byte field (which was a yes/no) was all 0's, and the number field was still
>all blank.
>
>So I hypothesized that by setting a Yes/No field, you had either 0 or -1
>(maybe 1, I don't remember), but since a Yes/No field only has two possible
>values, there was nothing for null, so each field is automatically 
>populated
>with 0 or -1.  By switching that field to a number field, it tried to
>'convert' the data in those fields, which it did successfully to 0.
>
>So to prove this, I went into design for that table, changed my 'null
>filled' number field to Yes/No, hit save, changed it back to number, and 
>hit
>save again.  Whalla, went into datasheet view, and no I had all zero's in 
>my
>number field.
>
>Pretty interesting eh?  (Or do I just need some sleep?)
>
>Drew
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

_______________________________________________
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