Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete record subform

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
deleting a record from a subform is easy and this works.
My question is :

My subform has a drop down box with values (in this case it are options). For one product of the main form you have one or more options. Every options can be related to more then one product. So if the user make a few options the result is fixed in a between table. This works.

If the user delete an option in the subform the results in the between table are not deleted, only the selection in the subform. If a user delete an option in the subform the result in the between table should also be deleted.
I was looking for something as relationships or linked queries, but dit not find a solution up to now.
 
Generally a relationship table indicates a relationship between two 'constant' tables. For example:

[tt]Cars:
1 Ford
2 Toyota

Colours:
1 Red
2 Yellow

Car_Colours:
1 2
2 1[/tt]

In such a case you would only delete records from the relationship table as cars and colours are 'constant'. The form set-up would have a subform based on the relationship table with combo for each ID.

If this is not how your tables work, it is possible that Cascade Delete may suit, used with care, or a delete query run through VBA.
 

One thing to be aware of is that you may not want to delete a record - only mark it as not to be used. You can add a boolean field that hides that record from the combo boxes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top