Conditional Delete

KevNewton29

New Member
Joined
Jun 23, 2004
Messages
9
I want to create a button that deletes a record from a database but provided a condition is met.

I have a checking database with client insurance policies on them. For some clients there are more than one policy.

I designed a form + sub form that cycled through different policies based on the client chosen.

What I want to do is delete one of these policies if it is not needed but only if the client has more than one policy.

If he only has one policy then the client can be deleted instead (I don't this doing automatically, just a warning not would suffice)


Can anyone help?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You should be able to create a query that has the specific criteria you want to identify which records to delete. You can then change this query to a "Delete Query", which will delete all records that meet this criteria when run.
 
Upvote 0

Forum statistics

Threads
1,221,780
Messages
6,161,888
Members
451,730
Latest member
BudgetGirl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top