bobbysdog
asked on
Make blank cell in Delphi "You cannot add or change a record because a related record is required..."
I'm using Delphi with an MS Access Database.
I have two tables
Kid Names
==========
John
Mary
Paul
Class List
===========
Grade | Name
------- Ā ---------
Grade 2 | John
Grade 7 |
Grade 3 | Mary
Now for some reason, in Delphi, once a cell is modified, it will not let me change it to a BLANK cell again.
Yes these two tables are in a relationship.
But Delphi is OK with the cell being a blank cell--BEFORE a change is propagated. But once you propagate a change, and try to go blank again, you get the error message in the Title of this thread.
This is obviously because, there is no blank cells in table KIDS NAMES.
So how do i find a way to specify that I do not wish to assign a kid to GRADE 7 at this time. e.g. i want to leave it blank for now...?
I have two tables
Kid Names
==========
John
Mary
Paul
Class List
===========
Grade | Name
------- Ā ---------
Grade 2 | John
Grade 7 |
Grade 3 | Mary
Now for some reason, in Delphi, once a cell is modified, it will not let me change it to a BLANK cell again.
Yes these two tables are in a relationship.
But Delphi is OK with the cell being a blank cell--BEFORE a change is propagated. But once you propagate a change, and try to go blank again, you get the error message in the Title of this thread.
This is obviously because, there is no blank cells in table KIDS NAMES.
So how do i find a way to specify that I do not wish to assign a kid to GRADE 7 at this time. e.g. i want to leave it blank for now...?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
ASKER
Right - the solution was to make it NULL
I used this line to do it:
Open in new window