Quick question re:form versus table properties

ahuvas

Registered User.
Local time
Today, 08:30
Joined
Sep 11, 2005
Messages
140
Hi

I know this is probably a silly question but I had a number of checkboxes in a table and had set their default value to be 0 however I did not do this in the table properties of these fields.

I can understand some things like formatting dates in a form but storing it differently in the table but why did access not automatically input 0s in all the fields where I did not check the box?
 
I know this is probably a silly question but I had a number of checkboxes in a table and had set their default value to be 0 however I did not do this in the table properties of these fields.
A "checkbox" field is a boolean argument. The boolean values that are associated with it are 0 and -1. But, you're not supposed to see a number on the screen. The number is just the identifier (for the program's recognition) for what the values of the box is.
why did access not automatically input 0s in all the fields where I did not check the box?
If I didn't answer this above, I'm not following you here...
 
Thanks.

So you mean for check-boxes 0 is an internal recording keeping thing for access and does not denote an unchecked boxed when place in the field default on the form?
 
When you set the default value in the form and not the table, the form's default value is only used on an unbound control. Since you have the form bound to a table, the table values overwrite the form values. It sounds like you didn't set the defaults in the table design, but because they are bound controls, those NULLs are overwriting the defaults in the form view. Set the default in table design and you'll be fine.
 
Here's some additional explanation if you need it:
So you mean for check-boxes, 0 is an internal recording keeping thing for access
YES, one of them. The integer is the identifying value of the box
and does not denote an unchecked boxed when place in the field default on the form?
NO, it does denote an unchecked box, but you will not SEE the 0 in the field! You will see an unchecked box. You will never see an integer in a control that represents a yes/no field.
When you set the default value in the form and not the table, the form's default value is only used on an unbound control.
I disagree.
Since you have the form bound to a table, the table values overwrite the form values.
I don't think this is right Moniker, but there might be too much explanation floating around here.

Scenarios (for BOUND forms and controls)

**Table Default Value Set / Form Default Value Set = FORM Default overwrites everything
**Table Default Value Set / Form NOT SET = TABLE Default values overwrites everything
**Table Default Value NOT SET / Form Value Set = FORM default overwrites
 
Last edited:
Nope, you're right. I had it backward. The coffee wasn't flowing yet. ;)

Good catch.
 

Users who are viewing this thread

Back
Top Bottom