Restricting Deletion to One record only in a Subform

  • Thread starter \Roshan Abbasi via AccessMonster.com\
  • Start date
R

\Roshan Abbasi via AccessMonster.com\

Is it possible to restrict Deletion to One record only in a Subform
(datasheet view), that is disallowing user the multiple-selection of records.
The ultimate purpose of this action is recalculating the totals etc. affected
by the deletion of records.
 
A

Allen Browne

You can test the SelHeight property of the form in its Delete event to see
how many rows are selected, and cancel the event if there's more than one.

The real solution, though, is to develop an event-driven mind-set so you
understand how the events work, and used a normalized data structure so you
are not storing dependent values. That way you don't have to take on the
responsibility of ensuring that your stored values are always kept up to
date regardless of what the user does.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

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