Access Combo Box AutoSelect content on Click

I want to automate what is achieved by double clicking in a combo box ProjectNumberFind with VB code so the visible content is selected and will then get replaced by what a user next types

I find selecting the contents of Text Boxes speeds data entry by using OnClick but can't make it work with my Combo Box
Me.Form.ProjectNumberFind.SelStart = 0
Me.Form.ProjectNumberFind.SelLength = Len(Me.Form.ProjectNumberFind.Text)

Me.ProjectNumberFind.SetFocus achieves what I want when triggered from another location but I can't find any way of making the cursor auto select my Combo Box without double clicking
ARamptonIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can do something like this in the Enter or GotFocus event:

Me.YourCombo.SelStart = 0
Me.YourCombo.SelLength = Len(Me.YourCombo)
If you teach people to tab through the controls rather than clicking, you won't need any code at all.  each will be selected automatically.
ARamptonIT ManagerAuthor Commented:
Tried that but it does not work in Access 2010 forms with a Combo Box
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Try it in the MouseUp event. You may also need to refer to the Column of the Combo:

Me.YourCombo.SelLenght = Len(Me.YourCombo.Column(1))

Assuming the second column in your combo contains the text shown in the combo.
ARamptonIT ManagerAuthor Commented:
I can't get Me.YourCombo.SelLenght = Len(Me.YourCombo.Column(1)) to work

Tried using Me.YourCombo.SelStart = 0 &  Me.YourCombo.SelLength = Len(Me.YourCombo) with OnMouseUp which does work but MouseUp is needed for normal operation of selecting an entry from the dropdown list so causes conflict when used
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Then I think you're stuck ...
Martin LissOlder than dirtCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
ARamptonIT ManagerAuthor Commented:
I still need a smart way of enabling typing in  ComboBox without double clicking

Has anyone else managed this?
You need some additional logic in MouseUp. Selection should be made only once after got focus. Look at sample

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ARamptonIT ManagerAuthor Commented:

Your example seems to do just what I want, I was thinking it might need some form of counter to disable subsequent selection when one needs to use the combobox dropdown menu

I will try your process in my Database
Martin LissOlder than dirtCommented:
I've requested that this question be closed as follows:

Accepted answer: 500 points for als315's comment #a40768289

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ARamptonIT ManagerAuthor Commented:
Excellent solution

I was thinking of trying something similar myself but great to have someone who already knows a workable solution

I find it frustrating so many other experts think there is no way of achieving what you have proved works nicely
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.