View Single Post
  #8  
Old April 15th, 2010, 11:34 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Access not enforcing referential integrity!!!

On Thu, 15 Apr 2010 10:38:06 -0700, Danny
wrote:

!!! The default value of 0 is not working on subforms. I've set the default
value in both the table and the subform, but it doesn't seem to get set when
I attempt to enter data into the subform when the parent form record is
empty. Here is what happens:

- Main form record is empty
- Subform record is empty, and default value of 0 displays in the FK field
- I start typing data into the subform record, while main form record is
still empty
- FK field value changes from 0 to NULL


Erm? What's the Master and Child Link Field? The Master should be the PK field
on the parent form, the Child should be the FK. I'd say that the FK field
should be required but that you should *not* use a zero default; that's more a
pain in the neck than any sort of benefit (since it will always be wrong and
need to be edited).

I suspect your master/child link isn't set up, or isn't working correctly.
--

John W. Vinson [MVP]