By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,504 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,504 IT Pros & Developers. It's quick & easy.

DelButton for Multiple Recs on ContinuousForm

P: n/a
I have a continuous form that has Allow- Add/Edit/Del set to False, so
that the form is in View mode only.

I have New/Edit/Del buttons in the form header. My New & Edit
buttons work as a like. My Del button works great also, but for one
record at a time only.

In ViewOnly mode, the user is able to highlight a single record to
delete using the RecordSelector, press the DelButton and it works
fine. However, if multiple records are selected, lets say
3-onsecutive records are highlighted on the RecordSelector, I can only
get one record to delete. The problem is that once the
DelButton is clicked, the RecordSelector changes to only one record
selected for delete, and proceeds to Delete only one record.

How can I get my DelButton Code to see Multiple Recs selected for
deletion??? Can I stick with the RecordSelector, or do I have to add
a checkbox to each record???

Thanks Greg

Feb 11 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Before the Click event of the button executes, the focus moves from
whereever it was to the button. That means you no longer have multiple
records selected. Therefore you cannot use a command button on a form to
delete multiple records.

Use a toolbar button instead.

The same problem occurs when you try to put a Cancel button on your form: if
they user has only a partially entered date, or has backspaced out the entry
in a required field, Access won't let them out of the control. Therefore
they can't get to to the Cancel button on the form, which makes it useless
for these cases.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Ap******@gmail.comwrote in message
news:11**********************@h3g2000cwc.googlegro ups.com...
>I have a continuous form that has Allow- Add/Edit/Del set to False, so
that the form is in View mode only.

I have New/Edit/Del buttons in the form header. My New & Edit
buttons work as a like. My Del button works great also, but for one
record at a time only.

In ViewOnly mode, the user is able to highlight a single record to
delete using the RecordSelector, press the DelButton and it works
fine. However, if multiple records are selected, lets say
3-onsecutive records are highlighted on the RecordSelector, I can only
get one record to delete. The problem is that once the
DelButton is clicked, the RecordSelector changes to only one record
selected for delete, and proceeds to Delete only one record.

How can I get my DelButton Code to see Multiple Recs selected for
deletion??? Can I stick with the RecordSelector, or do I have to add
a checkbox to each record???

Thanks Greg
Feb 12 '07 #2

P: n/a
Thankyou for the response Allen
>Before the Click event of the button executes, the focus moves from
whereever it was to the button. That means you no longer have multiple
records selected. Therefore you cannot use a command button on a form to
delete multiple records.
I've been playing with problem, and discovered that the following code
placed in the MouseUp event of the form yielded interesting stuff.
I'm wondering if variable assignments of SelTop and SelHeight could
somehow be used to delete the selected records??? Any thoughts? Not
sure how to proceed along that line!

MsgBox (Me.SelTop & " " & Me.SelHeight)

Greg

Feb 12 '07 #3

P: n/a
Not useful. Use toolbar.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Ap******@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
Thankyou for the response Allen
>>Before the Click event of the button executes, the focus moves from
whereever it was to the button. That means you no longer have multiple
records selected. Therefore you cannot use a command button on a form to
delete multiple records.

I've been playing with problem, and discovered that the following code
placed in the MouseUp event of the form yielded interesting stuff.
I'm wondering if variable assignments of SelTop and SelHeight could
somehow be used to delete the selected records??? Any thoughts? Not
sure how to proceed along that line!

MsgBox (Me.SelTop & " " & Me.SelHeight)

Greg
Feb 12 '07 #4

P: n/a
Thanks Allen

Because my application is committed to the button operation I
described, I chose not to use a toolbar button. I noticed you
suggested a keyboard sequence in a previous post. I went with this,
and it fits into the logic of my app interface just fine.

Thanks
Greg

Feb 12 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.