>1. Create a combo box
2. Open its properties
3. Set Rowsource type: Table/Query
4. Click the Rowsource line, then press the ... (three dots)
5. Insert the Table or Query you use as the source of your form where this
combo box exists
6. Insert the field that you want to be the source of your combo box (sort
it if you want)
7. Double-click the grey area next to your table above the QBE (query by
example) Grid.
8. Choose UNIQUE VALUES = YES
9. Close the builder (dont click the save icon or save the builder..just
close it)
10. Set your column width to 2" and row width to 2"
11. Set Limit to List = YES
12. Click the events tab. On the OnEnter event...click the ... (3 dots) and
choose code builder
12. enter the code: [whateveryourcom boboxnameis].requery
Yes, it worked!
Limit To List should be set to No if I want to add new values. If it is set to
Yes, then the requery statement is not necessary, as Limit To List Yes will not
allow new values.
I assume I must use this procedure for each combo box -- that I cannot select
them all and set the various items universally -- correct me if I'm wrong. I
imagine there are SQL statements that can do this. Since I finally know now how
to get to the Unique Value settings, I should be able to get databases to work
with what I consider standard time saving features. Radio buttons are next (is
that what Access calls them?). I'll post if there are further difficulties!! --
(I bet you can't wait.)
Paul, you are aware obviously, that Access (and I suspect all of Office) is
very strange software. It is NOT user-friendly, but relies on a technical
approach, which is good for flexibility. But, I don't understand why Microsoft
doesn't also build in commands to do the typical things like this
automatically. For instance, duplicating a record is a handy button to have,
but there is none (I know what you're going to say -- make a macro and assign a
shortcut).
It's as though the software engineers made the applications so complex and
feature laden that when the documentation had to be done, there was no way to
cover every situation a user may want to do, so only general technical help
instructions are given. Instructions for common situations, like the combo box,
do not exist, because the number of permutations of what someone could do with
it are huge. OK, it works anyway without setting Unique Values to Yes -- maybe
only a perfectionist like me wants a proper list.
Correct me if I'm wrong, but the instructions you gave me are not in the Help
menus. If I enter Unique Values in the Help window, there is a general
statement about it, but, for instance, no instruction about double clicking the
huge gray area to get to the properties -- how would anyone know to do that?!!
I did find instructions for requery, but there is no way I would have known to
look for that if I had not already learned it from you.
I can only hope that the books I will be perusing will have the instructions I
need in the future. I am curious as to how you learned the instructions you
gave me -- for example, point me to any documentation that mentions the double
clicking to get to the properties.
Thanks for your help.
Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com