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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deletion based on combo box in Continuous Forms.

Status
Not open for further replies.

sd110404

Programmer
Nov 3, 2004
63
US
Hi,

I have a Continuous Forms with few fields (Item is combo box and Amount is text box which needs to be entered) in it..

Item Amount
Payment 300.00
Sample 100.00
Extras 150.00

So on...

Deletion and edition shouldnot be allowed on Payments Item.

Forexample, I should be allowed to enter select Payment from item combo box and enter an amount for it. But shouldnot be able to delete (Me.allowdeletion) that record and edit the amount.
Is it possible to do this? How can i code this?
Thanks for any answer.

 
Hi

If you do not want to allow Deletions at all using the form, then set .AllowDeletion = False, if yo want to disable deletions depending on the type of payment, then code in the OnDelete even something like so should do it:

If Me.MyCombo = "Payment" THen
Cancel = True
End If

using your own control name of course

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top