Restricting Deletion to One record only in a Subform

  • Thread starter Thread starter \Roshan Abbasi via AccessMonster.com\
  • Start date 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.
 
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]...
 
Back
Top