Data Entry in Form - Select from a Drop Down List

J

Jasun74

I'd like to have a drop down list in any field so that when someone inputs
new data it is based on previous entries. (To prevent mis-spelling etc)

I also have the Un&Lock command button set up if it's relavent.

Thanks
 
D

Danny J. Lesandrini

You'll have to make them all combo boxes, based on existing values. So
if the field is [PaintColor], for example, in a table named tblPaintOrder,
your combo box would look something like this ...

sSQL = "SELECT DISTINCT [PaintColor] FROM tblPaintOrder ORDER BY [PaintColor]"
cboPaintColor.RowSource = sSQL

This looks up ALL the values for PaintColor in the target table. Alternatively,
you could have a lookup table as the sorce, tblPaintColor. But I'm assuming
you might have fields that need to allow users to add values, and you want that
to happen easily, so you might set the LimitToList to false.

That way, when a user enters "Luster Beige" as a color, they may do so
without having to add it to the tblPaintColor table. The next time someone
types Lus... the list will jump to Luster Beige and assist in data entry ... provided
you have the autocomplete property set to true.
 

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