Form!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 Tables which are One to One related.
Now I ceate a Form which based on Table B (Username,StudentID)
In Table A, has Lastname and Firstname. (StudentID is also including in
Table A)
I tried to create a Form which include Username,StudentID from TableB and
Lastname,Firstname from TableA.
But, when I delete the record in this Form, it not only deleted the record
in TableB but also deleted in Table A.
My goal is any record in this form based on Table B mainly. So when the
records are deleted will not concern to Table A (Because in the tables
relationship here: Table B relates to Table A only)

Pls show me the solution for this problem. Thanks so much

Cheers,Jason
 
If your tables have been set up with a relationship between them, and that
relationship has been set to Cascade Delete, then deleting from one table
will cause data to be deleted from the other table.

Remember that forms do no contain data: tables do. Forms are strictly
"windows" into your data.
 
Hello Doug,

Thanks for your help. Howvere if I uncheck the Cascade Delete Option in
Relationship Diaglog box, I wont be able to delete the record in Table B from
table A automatically.

My goal is any record was deleted in Table B in form will be not affected to
Table A. But any records in Table A deleted will be also deleted in Table B
automatically.

Can you have any solution for this ?

Thanks, Jason
 
You're missing the point.

Forms do not contain data: tables do. You cannot delete data from a form and
not have it delete from a table.
 
how is your tables' relationship set up? even one-to-one relationships have
a "direction". look in your relationships window: if you linked *from*
TableA *to* TableB, then you should be able to checkmark CascadeDelete; then
records deleted from TableB will not affect TableA, but records deleted from
TableA will also cause related records in TableB to be deleted.

if you linked *from* TableB *to* TableA, then delete the link and relink as
stated above.

hth
 

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

Back
Top