Insert "All" into a combo box

Magster

Registered User.
Local time
Today, 01:21
Joined
Jul 30, 2008
Messages
115
Hi all,

I'm using Access 2007 and I would like include "All" as the first selection in my combo box then populate the remainder of the combo box from an existing table. There are two fields, the first is the Primary key of the table, and the second is a description. I believe that I can create a function in VBA and call that from the RowSourceType.

I tried to use the AddItem method of the combo box without success.

Any helpful ideas would be appreciated!

Thanks!
 
Base your combo box on a Union Query where you combine the records with the table fields you want and a record with the word "All" in it.
 
How simplistic! Thanks I'll try that right now.
 
This works great!

I created one local table that I can use with all of my combo boxes that need to have an "All" selection. I truly appreciated your quick response to my question - you saved me a lot of time.

PS My entry in the local table is <All> so it is always sorted first in a text field that has alpha characters.
 
yes, thats the normal technique - if you have a hidden column, you need a value that won't be encountered in the real data - eg minus 1, for a numeric column.
 

Users who are viewing this thread

Back
Top Bottom