Add a combo box

T

Teddy

I want to create a form with a combo box that has 3 choices only. I would
like the choices to be Exceptional, Very Good, and Good. In the table design
I thought I was supposed to do the following.

General tab / default value / "“Exceptionalâ€; “Very Goodâ€; “Goodâ€"

Lookup tab / display control / combo box

Lookup tab / row source / "“Exceptionalâ€; “Very Goodâ€; “Goodâ€"

However, I continue to get error messages after I put the form together and
try to use the combo box.

Do you know what I might be doing wrong? Or can you advise me alternative
steps I can take to get this combo box to work properly?
 
J

John W. Vinson

I want to create a form with a combo box that has 3 choices only. I would
like the choices to be Exceptional, Very Good, and Good. In the table design
I thought I was supposed to do the following.

General tab / default value / "“Exceptional”; “Very Good”; “Good”"

A Default Value is *ONE* value which will be the one chosen if the user makes
no other selection. It is NOT used to provide the list of values.
Lookup tab / display control / combo box

See http://www.mvps.org/access/lookupfield.htm for a critique of the Lookup
Field, that many of us consider a misfeature.
Lookup tab / row source / "“Exceptional”; “Very Good”; “Good”"

What's the Row Source Type?
However, I continue to get error messages after I put the form together and
try to use the combo box.

Do you know what I might be doing wrong? Or can you advise me alternative
steps I can take to get this combo box to work properly?

Use a Form rather than a table datasheet for data entry, and a combo box on
the form (you could set its Default Value property to "Good" if that's the
most common choice, or leave it blank and make the field Required if you
prefer to force the user to make a choice).
 
T

Teddy

Awesome John! Thank you for clarifying the default value and row source. I
tried the link but I got a message that read "Not Found: The requested URL
/access/lookupfield.htm was not found on this server."
 
J

John W. Vinson

Awesome John! Thank you for clarifying the default value and row source. I
tried the link but I got a message that read "Not Found: The requested URL
/access/lookupfield.htm was not found on this server."

Sorry... my typo! It's

http://www.mvps.org/access/lookupfields.htm

Short story: Tables should be used for data storage ONLY. They should *never*
be used for routine user interaction with data.

Lookup Fields make it easier to work in Tables directly... but you really
don't WANT to work in tables directly. Otherwise they cause more confusion and
inefficiency than benefit.

You can (and certainly should!) use Lookups - combo boxes - on Forms, but it's
not necessary to use the Lookup Field type in order to do so.
 
T

Teddy

Great stuff. Thank you again John.

I got the combo box to work in the form. I went into the table in design
view and for the field where I wanted the combo box I selected data type
lookup wizard and typed in the values that I wanted to display. What do you
think of that approach?

Also, I understand most of you said but I still have one question. In your
last post you said

You can (and certainly should!) use Lookups - combo boxes - on Forms, but it's
not necessary to use the Lookup Field type in order to do so.

When you say the Lookup Field type what do you mean? Can this be found on
the table in design view?

Thanks for your input and the link its very interesting reading.
 
J

John W. Vinson

Great stuff. Thank you again John.

I got the combo box to work in the form. I went into the table in design
view and for the field where I wanted the combo box I selected data type
lookup wizard and typed in the values that I wanted to display. What do you
think of that approach?

That it's unnecessary and will just make your database harder to work with.

The Form can have a combo box, which will work perfectly well and not cause
any difficulties, even if the Table field datatype is Text. In fact that's
exactly what I'd recommend.
Also, I understand most of you said but I still have one question. In your
last post you said

You can (and certainly should!) use Lookups - combo boxes - on Forms, but it's
not necessary to use the Lookup Field type in order to do so.

When you say the Lookup Field type what do you mean? Can this be found on
the table in design view?

The Lookup Field type is what is created by the Lookup Wizard. It can be
identified by looking at the lookup tab in table design view for this field;
if it shows "Combo Box" then you have a Lookup Field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top