Listbox and Access' selection program

R

Ronald Dodge

Using AC02, SP2 on W2K Pro, SP4

Is there a way to prevent Access from running it's selection program on the
list box that the mouse events takes place on?

I have attempted to use the MouseDown event to determine which items are
selected and which are not, but then Access runs it's selection program
*AFTER* the MouseDown Event has ran.

Changing the Button/Shift numbers in the code has no impact either.

The main thing I'm attempting to do is add in a Drag and Drop type feature
of which I have looked at Leban's example, which works okay for single
items, but I'm wanting to create this feature to allow for selection of
multiple items in Multi-Extended Selection mode.

Given what appears to be as a bug of Selected Property on the items of a
listbox not being set as the mouse events are taking place, when listboxes
are in Multi-Extended Selection mode, I have started the creation of my own
set of code to determine what gets selected and what doesn't. So far, of
what I have done up to this point, which deals with manipulating a list in
string type format, it has been working properly.

The only other thing that I can think of doing to get around this issue is
to use Excel's OnTime function to run the MouseDown procedure immediately
after the MouseDown Event has taken place. I don't like coding like this
cause too many things can happen, if not used with care.
 
P

Peter De Baets

Ronald,

We have a product that allows dragging and dropping of multiple items
from/to an Access list box. It is called Drag-N-Dropper and a shareware
version is available from: http://www.peterssoftware.com/dd.htm

Drag-N-Dropper "selects" an item in to the listbox multi-select set from the
MouseDown event, so it should do what you describe below.

Hope this helps,
 
R

Ronald Dodge

From what I could tell, it looks like it would do the job fine, but knowing
the owners of the company, they won't pay for it and I'm certainly not going
to pay out of my own pocket for it when it's for the company and I won't get
reimbursed for it. If I was in business for myself, then maybe I would. I
have been looking into seeing about getting into business for my own self,
but before I can do that, I have to build up my own set of tools and other
resources, of which I have various objectives already starting to take place
for that to eventually happen, but it's going to take time. Thank you for
taking the time to point me to it, but even the shareware version states
evaluation, which what good will it do my program, if the company not going
to pay for it?

Thankfully, I look at a job as a temporary type deal until I can get into
business of my own. Even though JOB means "Just Over Broke", but with the
strict budget that I had to live on back in the mid 90's while in college
(of which I'm still paying for), I'm looking at getting out of the hole
within the next 2 years, and out of debt within the next 7 years. I already
have a financial program in place that not only shows the current financial
standings, but also tracks my family's financial networth on a daily basis
using accrual basis accounting (including taxes). Yes, I even go outside
and read the meters pretty much daily, which then record that info in my
financial program (that I created) as that calculates out the cost of that
energy consumption. I not only have a Long-Term Networth calculation, but
also Short-Term Networth. As far as the family budget is concerned, I only
put in the budget if it's 1) a need of the family, 2) limited entertainment
expense for the quality of life aspect, or 3) anything else doesn't go in
unless it's to increase Networth within reason, as this third one has to be
guarded closely.
 
R

Ronald Dodge

Just to give an update, I have finally gotten the mouse portion of my drag
and drop feature to work properly on listboxes in Access. The coding that I
have done took 2 major sets of codes, one dealing with string manipulations,
of which that set of code, I already had a pretty good amount created for
other reasons, but then I had to add additional methods to it, which was
already planned for anyhow, but in this case, those additional features were
expedited so as I could get my second major set of code to work properly,
the code that deals directly with the Drag and Drop feature on listboxes.
This second major set of code is in a Class Module, so as multiple listboxes
can use this same code at the same time. I'm not really sure if it was
programmed by design or if it was accidental by MS, but anyhow, at least a
good majority if not all of the Values of the different properties on the
listbox itself does not change automatically as the various events on the
object are taking place, provided the listbox is the active object on the
form.

I still have yet to work out the Keyboard side of things for this feature,
but at least the mouse side is complete and I now know the different issues
that's involved.
 

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