Delete sub form records

Y

Yousoft

I have one main form linked with many sub form, my problem if I want to
delete one record, it delete only form the main form table so when you open
another table you will find same record still there in another tables so what
I will do to delete the records from all tables in the same time.
Thanks
 
G

George

I assume that you use relationships between your Main table and the other
tables (either one to one or one to many). So, in the relationships windows
you have to enforce referential integrity and choose Cascate Delete Related
Records for all of your relationships.

By the time you delete a record from your main table, all related records
(to secondary tables) will be deleted too. - Remember that this is very
dangerous.

Hope this helps,

GeorgeCY

Ο χÏήστης "Yousoft" έγγÏαψε:
 
Y

Yousoft

Dear sir,
I' follow your answer to delete the sub-form records

but my problem when I try to go from main form to sub-form records I
receive this message :( you cannot add or change a record because a related
records is required in table 'children').
So what I, can do to solve this problem?
Thanks
 
G

George

What is the structure of your database / relationships?

Ο χÏήστης "Yousoft" έγγÏαψε:
 
Y

Yousoft

Thanks Mr. George
I solved this issue, my problem now I don’t want the sub-form repeated or
expand when I, try to move to another sub-form, I mean when I reach the last
record in sub form, again sub form repeated or expand to dawn what the
solution for this problem.
Thanks
 
G

George

Although I don't understand what is the problem, is it a kind of homework?

Ο χÏήστης "Yousoft" έγγÏαψε:
 

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