master detail record deletion problem in detail record

rashidzaib

Registered User.
Local time
Today, 15:14
Joined
Aug 12, 2007
Messages
32
hy bro and sis
i hope all r fine
this is my first time using this site and i found this is very usefull and helpfull site.

friends i have one master and detail form . i have one comand button to delete record. and when i am deleting the detail table record iit also deleting the mster record in master table.
i want to delete only detail record. any help should realy appriciated.

and also is there any way to scroll text in access form same like marquee in html.
if any one of you know pls help me also in this regard.
i am waiting for ur reply
thank you in advance
yours truly
rashid zaib
take care
bye
 
What you describe can occur in a few different ways.

1. Delete detail deletes "parent" record. If this happens - and if another detail for the same parent is NOT deleted, you MIGHT have turned on relational integrity but you got the "pointer" backwards. Access THINKS it is deleting the child when you delete the parent. That is one way it could happen.

2. Another is if you delete a detail record from a query involving a JOIN with the parent, it is POSSIBLE that you have the situation such that Access has to delete the parent because it is part of the query. That isn't normal, but it is possible.

3. If you build a form and have proper parent-child setup, and the form refers to the child table only via a sub-form, you should have TWO sets of controls that would let you delete records. Only clicking the sub-form control should delete the child record. If you click on the delete control for the main form, that kills the parent.

4. If you only see ONE delete button because you built it on the form (in particular, if built by the button wizard), by default the button deletes the record bound to the form. So if this delete button is on the form bound to the parent, that's what you delete. You can muck about in the VBA behind the button, but it would be easier to have main and sub forms and put the delete button (via wizard) on the sub form.
 
still not understand master detail deltion item

hy sir
hope u r fine
first of all thank u very much for ur reply.
sir i am new to access and i am first time using access and i am suceded in access mostly every step . but here i have only one problem.
i have production order master form and order detail subform. and i have created one delete button by vizard but when cursor is on detail record and i press delete button then it is delting full order not ony one detail record.
sir pls can u give me coding or any help how i will continue my process.
this matter is very urgent.
any help should realy be appriciated.
thank you and best regard
your truly rashid zaib
take care bye
 

Users who are viewing this thread

Back
Top Bottom