Full Version: Must Click Listbox Twice
UtterAccess Forums > Microsoft® Access > Access Forms
DrPat
Good afternoon everyone,

My quick data entry form has a textbox, 4 listboxes and a very annoying feature.

After entering the date in the text box, the user must click the listbox twice before selecting the item. Doesn't matter which, just the very next listbox clicked.
one click does it for the other listboxes afterward.

I didn't think much of it at first, but this form is to help me catch up on lots of data entry, and now is driving me nuts.

They are all simple listboxes. No events attached to any of them. Simple queries as record source and a FK as control source.


I'm certain is has to do with listboxes and focus, but I can't think of a work around.

Thanks,
/Pat
theDBguy
Hi Pat. Are there any code behind this form? If so, can you post them? Thanks.
DrPat
Hey DBG,

Thanks for checking in on a Saturday afternoon.

No code behind the form or any of the controls (Yet)

(Don't let this distract you from the final four)

/Pat
R. Hicks
Are the listboxes with a subform ????
If yes .. then the first click would select the subform and the second would select the control within the subform.

This may not be what is happening ... only a thought.

R.
RJD
Hi Pat: I was curious, so I build a demo (A2010 - I assume you have all the appropriate SPs and hot fixes) and used a textbox and two listboxes on a form, all unbound. And couldn't seem to duplicate your issue. So I made a table with multiple fields and bound them to the form/controls. Still couldn't seem to duplicate the issue.

So I guess the next steps seem to be 1) have you create a new form, set up basically like the other one, and see if you get different results and 2) if that still gives you the same results, post a db (relevant objects, test data of course, zipped) and let someone take a look. Maybe we can see something we haven't thought of when it is in operation.

Or maybe someone else has some additional ideas (like Ricky, just above).

HTH
Joe
DrPat
No subform, nothing tricky.

It's about as plain Jane as they come.

Here's the stripped down version

Thanks,

/Pat

Click to view attachment
DrPat
Hey Joe,

Always a pleasure to hear from you.

My guess is that it has something to do with clicking the date on the date picker, because if I type the date in, this annoyance doesn't happen.

(Thanks for taking time out from the Orange-Tarheels)

/Pat
R. Hicks
I think I would use a combobox instead of the listbox if anyway possible (unless you need to use the multiselect feature)... the problem you describe does not exist when using a combobox.

R,
RJD
Hi again Pat: I was very curious about this, so I have been running some tests, as much for my own benefit as to address your dilemma. As Ricky sort of alluded to, the listbox behaves as if it were a subform, requiring a click into it to get focus, then a second click to make the selection. I tried about a dozen ways to get this to work without the second click, all without success. I also went out to the web and found some discussion, but no clear way that worked for me to go from the date picker selection to a listbox selection with one click, even trying some (gasp) SendKeys approaches.

But also note that the combobox Ricky suggested also requires two clicks - one on the down-arrow and one more for the selection - and possibly more action to scroll down if necessary.

Perhaps you could re-evaluate the listboxes and turn them into option groups if the list is fixed (I haven't try that yet).

So, thus far it looks like we have no solution to the listbox issue for you in this thread.

Perhaps someone else has found a solution for this and will join in. My brain is tired now (10:23 pm my time on a Saturday night!) (It gets tired faster the older I get!) I'll look back in on this from time to time to see, because I'd love to know the solution to this, if there is one. Perhaps it is something very straight-forward so I can feel both enlightened and dumb at the same time. dazed.gif

Many regards, always happy to see you around,

Joe
DrPat
Thanks gentlemen,

The strange thing is that the double-click is only necessary when going from the text box to list box, not list box to list box.

I'm going to change to comboboxes, as Ricky suggested as well as change to a datasheet form while I'm at it.

Thanks again, men. Enjoy the rest of your weekend.

/Pat
RJD
Hi Pat: Don't know if you are still watching this thread, but it just occurred to me (should have been earlier no doubt) that if you change the order of the controls so that you select the choices from the listboxes first, then use the date-picker, you don't have the two-click issue with the listboxes. It is the date-picker that causes the issue, and if it is last, after the listboxes, then there is no issue. The Save/Next command button works just fine on one click after the date-pick. See the revision to your db attached.

Just a thought.

HTH
Joe
DrPat
Joe,

I came across the same thought. At this point it's a trade off between the annoyance and the flow of data entry.

The issue seems to be with the date picker. If you type in the date, the textbox releases focus on one click.

Thanks for going the extra mile. You're one of the reasons this site is so invaluable.

Have a great day,
/Pat
RJD
QUOTE
At this point it's a trade off between the annoyance and the flow of data entry.

Understand. But that "feature" of the date picker, combined with the listbox, is annoying, isn't it?

And I understand about user frustrations. Sometimes a very little thing like this can bend users negative on the application and process. You are very right to try to get around this issue, and sorry we couldn't come up with a better solution for this (so far).

Regards,
Joe
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.