A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Why am I getting related record required errors for optional FKs



 
 
Thread Tools Display Modes
  #1  
Old July 18th, 2007, 02:32 PM posted to microsoft.public.access.tablesdbdesign
Dan Neely
external usenet poster
 
Posts: 1
Default Why am I getting related record required errors for optional FKs

I have a table with several foreign keys that are not required, but whenever
I attempt to add a record without the FKs set I get the error message "You
cannot add or change a record because a related record is required in table
'tblFoo'." When the FK for tblFoo is the optional FK parameter.
  #2  
Old July 18th, 2007, 02:43 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Why am I getting related record required errors for optional FKs

Open the table in design view.

Select the FK field.

In the lower pane, remove the zero default value.

(MS has solved this in Access 2007: numeric fields don't default to zero
automatically.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan Neely" wrote in message
...
I have a table with several foreign keys that are not required, but
whenever
I attempt to add a record without the FKs set I get the error message "You
cannot add or change a record because a related record is required in
table
'tblFoo'." When the FK for tblFoo is the optional FK parameter.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.