MS Access: ComboBox is populated via VBA but items won't show

I have a form that contains a subform.

In the form I have a search box and a search by combobox.

The search by combo box should be populated with the searchable fields on the subform.

I write a simple vba code that I can see it does its job, but the the problem is that the combobox is still empty.

A showcase tiny database is attached.
Shadi SalehAsked:
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.

Gustav BrockCIOCommented:
Adjust your filter to include what you search for:

strFilter = Me.Search_By_combo.Value & " Like '*" & Me.Search_For_Box.Text & "*'"

Open in new window

Shadi SalehAuthor Commented:
@Gustav Brock: Thanks for this  important -yet aside-  note.

Hope you can help with finding out why the combobox won't show items after being populated. The only value that could appear is First Name because I chose it as a Default value from the design view mode.
Gustav BrockCIOCommented:
That's because you have set property ColumnWidth of the combobox to 0 (zero).
Clear it.


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
Shadi SalehAuthor Commented:
What a behaviour of Access!

Thanks a lot Gustav. The was really helpful, really pro and really expert.
Gustav BrockCIOCommented:
Thank you. You are welcome!

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

From novice to tech pro — start learning today.