473,394 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DelButton for Multiple Recs on ContinuousForm

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
4 2055
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rolf Wester | last post by:
Hi, I have a form with a select element with multiple="true". When using the GET method (I suppose the same happens with the POST method) I can seen that the form sends channels=CH1&channels=CH2...
66
by: Darren Dale | last post by:
Hello, def test(data): i = ? This is the line I have trouble with if i==1: return data else: return data a,b,c,d = test()
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
0
by: glenn | last post by:
I'm really scratching my head over this one. I'm working with CSV data exported from Excel, which explains why it's a mess to begin with. Within a table (or via any other means someone might be...
6
by: Ben Hallert | last post by:
Hi guys, I'm trying to figure out what bone headed mistake I made on something I put together. I've got a form (named 'context') that has a variable number of select-multiple inputs on it. ...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
6
by: kenshiro | last post by:
Hi All, I'm having a problem with some VBA code in one of my Access 2003 databases. I'm getting the following error when running code behind a command button on a form: "Item not found in this...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.