473,679 Members | 3,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird Inter-Table Dependency!

MX1
OK, here's one that's driving me nuts. Three tables. They are...

Master Table
JobRef Reference Table
ToolRef Reference Table

I've got a form for Master that has a combo box to let you select from both
of these reference tables. When I make a new record, the system lets me
leave JobRef combo box null and save the record. However, I can't save the
record unless the ToolRef combo box has a value selected. This is driving
me nuts! I can't figure out what the difference is here. What's the
difference?

Neither is a required field in the table design and neither has any
validation rules, etc. Both are linked to Master the same way in
relationships. The only difference is that the linking ID field between Job
Ref and Master is of type TEXT and the linking ID between ToolRef and Master
is of type NUMBER. When I try to leave ToolRef drop down blank, I get the
following error:

You cannot add or change a record because a related record is required in
the table 'ToolRef'

This causes a lot of aggravation for users doing data entry. I want them to
leave this field blank if they want. Odd! Any help is appreciated as
always! :)
Nov 12 '05 #1
6 2631
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Check if the field in the Master table has Allow Zero Length Strings
set to Yes. If so change it to No.

- --
MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP6CI4IechKq OuFEgEQJDDgCguU Vx5ySKGCj3H0n56 rEOifmISUkAoP4d
3CG7a4oFeTdL5He ZWuJkMAs1
=ipII
-----END PGP SIGNATURE-----
MX1 wrote:
OK, here's one that's driving me nuts. Three tables. They are...

Master Table
JobRef Reference Table
ToolRef Reference Table

I've got a form for Master that has a combo box to let you select from both
of these reference tables. When I make a new record, the system lets me
leave JobRef combo box null and save the record. However, I can't save the
record unless the ToolRef combo box has a value selected. This is driving
me nuts! I can't figure out what the difference is here. What's the
difference?

Neither is a required field in the table design and neither has any
validation rules, etc. Both are linked to Master the same way in
relationships. The only difference is that the linking ID field between Job
Ref and Master is of type TEXT and the linking ID between ToolRef and Master
is of type NUMBER. When I try to leave ToolRef drop down blank, I get the
following error:

You cannot add or change a record because a related record is required in
the table 'ToolRef'

This causes a lot of aggravation for users doing data entry. I want them to
leave this field blank if they want. Odd! Any help is appreciated as
always! :)

Nov 12 '05 #2
MX1
I checked this out. The problem I'm having is with the field and reference
table that has type set to Number - Long Integer. There is no option for
Allow Zero Length Strings. This is not a text field.
"MGFoster" <me@privacy.com > wrote in message
news:sN******** ********@newsre ad4.news.pas.ea rthlink.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Check if the field in the Master table has Allow Zero Length Strings
set to Yes. If so change it to No.

- --
MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP6CI4IechKq OuFEgEQJDDgCguU Vx5ySKGCj3H0n56 rEOifmISUkAoP4d
3CG7a4oFeTdL5He ZWuJkMAs1
=ipII
-----END PGP SIGNATURE-----
MX1 wrote:
OK, here's one that's driving me nuts. Three tables. They are...

Master Table
JobRef Reference Table
ToolRef Reference Table

I've got a form for Master that has a combo box to let you select from both of these reference tables. When I make a new record, the system lets me
leave JobRef combo box null and save the record. However, I can't save the record unless the ToolRef combo box has a value selected. This is driving me nuts! I can't figure out what the difference is here. What's the
difference?

Neither is a required field in the table design and neither has any
validation rules, etc. Both are linked to Master the same way in
relationships. The only difference is that the linking ID field between Job Ref and Master is of type TEXT and the linking ID between ToolRef and Master is of type NUMBER. When I try to leave ToolRef drop down blank, I get the following error:

You cannot add or change a record because a related record is required in the table 'ToolRef'

This causes a lot of aggravation for users doing data entry. I want them to leave this field blank if they want. Odd! Any help is appreciated as
always! :)


Nov 12 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, the error:

"You cannot add or change a record because a related record is
required in the table 'ToolRef'."

means that there is something in the ToolRef control that is NOT in
the table ToolRef. You may have accidently hit the space key when in
the control. Since you probably don't have a SPACE in the ToolRef
lookup table, the error occurs. Make sure you don't type anything
into the control and that there isn't any VBA code, or macro, that is
trying to put something in that control.

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP6FfB4echKq OuFEgEQKs/ACfe5280/wd8TRTBGv/sNeUH1uXRw8AoIE X
wnMpqTs456paUOD f4UGm7eVG
=1G1U
-----END PGP SIGNATURE-----

MX1 wrote:
I checked this out. The problem I'm having is with the field and reference
table that has type set to Number - Long Integer. There is no option for
Allow Zero Length Strings. This is not a text field.

< snip previous posts >

Nov 12 '05 #4

"MX1" <mx*@mx1.abc> wrote in message
news:6I_nb.4201 4$mZ5.239534@at tbi_s54...
OK, here's one that's driving me nuts. Three tables. They are...

Master Table
JobRef Reference Table
ToolRef Reference Table

I've got a form for Master that has a combo box to let you select from both of these reference tables. When I make a new record, the system lets me leave JobRef combo box null and save the record. However, I can't save the record unless the ToolRef combo box has a value selected. This is driving me nuts! I can't figure out what the difference is here. What's the
difference?

Neither is a required field in the table design and neither has any
validation rules, etc. Both are linked to Master the same way in
relationships. The only difference is that the linking ID field between Job Ref and Master is of type TEXT and the linking ID between ToolRef and Master is of type NUMBER. When I try to leave ToolRef drop down blank, I get the following error:

You cannot add or change a record because a related record is required in the table 'ToolRef'

This causes a lot of aggravation for users doing data entry. I want them to leave this field blank if they want. Odd! Any help is appreciated as
always! :)


You have allowed one of the FKs to default to zero, provided referential
integrity is enforced, JET will allow it to be null but not zero unless
there is a corresponding PK in your reference table.

David
Nov 12 '05 #5
MX1
Bingo. The ID field in Master was defaulting to a value of 0. I got rid
of that and can now leave the field blank without the annoying error.
Thanks!

"David Hare-Scott" <pr*****@nowher e.com> wrote in message
news:31******** ************@ne ws-server.bigpond. net.au...

"MX1" <mx*@mx1.abc> wrote in message
news:6I_nb.4201 4$mZ5.239534@at tbi_s54...
OK, here's one that's driving me nuts. Three tables. They are...

Master Table
JobRef Reference Table
ToolRef Reference Table

I've got a form for Master that has a combo box to let you select from

both
of these reference tables. When I make a new record, the system lets

me
leave JobRef combo box null and save the record. However, I can't

save the
record unless the ToolRef combo box has a value selected. This is

driving
me nuts! I can't figure out what the difference is here. What's the
difference?

Neither is a required field in the table design and neither has any
validation rules, etc. Both are linked to Master the same way in
relationships. The only difference is that the linking ID field

between Job
Ref and Master is of type TEXT and the linking ID between ToolRef and

Master
is of type NUMBER. When I try to leave ToolRef drop down blank, I get

the
following error:

You cannot add or change a record because a related record is required

in
the table 'ToolRef'

This causes a lot of aggravation for users doing data entry. I want

them to
leave this field blank if they want. Odd! Any help is appreciated as
always! :)


You have allowed one of the FKs to default to zero, provided referential
integrity is enforced, JET will allow it to be null but not zero unless
there is a corresponding PK in your reference table.

David

Nov 12 '05 #6
MX1
Removed default value of 0 in Master fixed the issue. Thanks for your time!
:)

"MGFoster" <me@privacy.com > wrote in message
news:0a******** *********@newsr ead4.news.pas.e arthlink.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, the error:

"You cannot add or change a record because a related record is
required in the table 'ToolRef'."

means that there is something in the ToolRef control that is NOT in
the table ToolRef. You may have accidently hit the space key when in
the control. Since you probably don't have a SPACE in the ToolRef
lookup table, the error occurs. Make sure you don't type anything
into the control and that there isn't any VBA code, or macro, that is
trying to put something in that control.

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP6FfB4echKq OuFEgEQKs/ACfe5280/wd8TRTBGv/sNeUH1uXRw8AoIE X
wnMpqTs456paUOD f4UGm7eVG
=1G1U
-----END PGP SIGNATURE-----

MX1 wrote:
I checked this out. The problem I'm having is with the field and reference table that has type set to Number - Long Integer. There is no option for Allow Zero Length Strings. This is not a text field.

< snip previous posts >

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1818
by: David M. Karr | last post by:
I've been asked to help debug a complex problem involving inter-frame references, so I just want to understand the elements involved with this. Apparently, there is a page with multiple frames, where one of the frames is a "hidden" frame, and is there just to contain one or more "fields" that are referenced from other frames. Supposedly, if a user "sits" somewhere in this set of pages for several minutes and then tries to do...
11
2436
by: Mr. Berserker | last post by:
I was posting stuff to a mailing list when a friend, Prof. Corbessero and I came up with this one. Perhaps you can help resolve this, or add anything else worth knowing?? Maybe it should be added to the FAQ for further reference... :) > > Ahh. This is my area... C stores arrays in a form called "column > major" order, which actually means the rows come first (don't ask!). > So, here is what a 3x4 array looks like in memory >
4
3845
by: Frank Meng | last post by:
Hi. I am trying a csharp sample from http://www.codeproject.com/csharp/socketsincs.asp . (Sorry I didn't post all the source codes here, please get the codes from above link if you want to try). I had some troubles when I started 6 threads (each thread made a separate connection) and sent messages to same server simultaneously. Sometimes, not always, the socket looks like ok, but really it is dead. I don't why it happens.
4
4959
by: Viper Venom | last post by:
Dear All: I am trying to write an application that consist 2 executables 1) Server.exe 2) Client.exe I start the server.exe first and then start the two client exe by code and kill both of the client when the server exit (This is already done)
7
31698
by: A.M | last post by:
Hi, What is the best way to implemet Inter Process Communication in .NET ? I developed two programs and I want to have them talk to each other. Thanks, Alan
13
4129
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
6
16712
by: les | last post by:
Here's a class which uses 2.0 generics to implement an inter-thread message queue in C#. Any number of threads can post and read from the queue simultaneously, and the message object can be any type. There's a test driver at the bottom which demonstrates usage. /*-----------------------------------------------------------------------------------------------------*/ using System; using System.Collections.Generic;
5
4127
by: Joseph Geretz | last post by:
I need to communicate between two applications. The legacy application is in VB6. New development is in C#. Here's the scenario: The VB6 app will be pumping document files into a folder. We'll be writing a new (C#) class for this new feature. The C# Application (as distinct from the file pumper class just mentioned) needs notification for each file pumped into the folder in order to process the file.
6
2817
by: zhangsonglovexiaoniuniu | last post by:
Dear all, I need you help. here the program: char a = 0x91; printf("%x",a);
0
2318
by: dantz | last post by:
After reading all of the materials in msdn about interprocess communication now I am confused. I hope someone can give me some enlightment. I am developing a multithreaded client-server application which communicates via HTTP Request using HTTPListener/HTTPWebRequest. The server(which is the focus of my question) will be having different modules. I want these modules to communicate with each other using the fastest IPC but I can't figure...
0
8550
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8482
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8900
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8726
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8749
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6412
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2164
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1904
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.