when entering data in form: says cannot add/change record cause...

R

Ryan

Says cannot add/change cause related record is needed in tableX.

I linked the two tables in the relationship page and have them as enforce
ref integrity and cascade updata and delete.

Shouldn't it automatically creat a record in that table?

Thanks. Ryan
 
B

Bob Larson

Ryan:

Sorry, but that's not how referential integrity works. Cascade updates,
much to the chagrin of many who attempt to use it, ONLY updates an existing
foreign key if the primary key in the other table has changed (which is a
rare condition).

You still need to add data to your table, so I'm thinking that you may want
to set up a main form/subform situation so that you can add a main record
first and then add the subform records.

--

Thanks,

Bob Larson
Access MVP

Free Access Tutorials and Resources: http://www.btabdevelopment.com
 
R

Ryan

Thanks. I went ahead and made it a subform. Now when i input data it the new
record shows up in the Table X but only the SSN field in populated not the
name field? Why wont it populate both?

Thanks.
 
D

Douglas J. Steele

Sorry, without more details it's pretty hard for anyone to say.

Is it the subform or the parent form that's bound to Table X?

If SSN is a foreign key in the child table, then odds are the name shouldn't
be in that table as that would result in the name being stored redundantly.
 
R

Ryan

I have formpersonnel and formtraining--from tbltraining--the formtraining is
the subform linked via SSN to master.
but...
I need a way to quickly enter training data via checkbox for each person--I
want all persons on page at once.

What is the best way to do this since I dont have everyones SSN memorized i
need to view names?

Thanks
 
D

Douglas J. Steele

I'd recommend using a combo box that displays the user name and returns
their SSN.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top