I need help in creating my first application in MS Access 2007.
Consider a table in MS Access with a column "AgeGroup" and the possible values for this column are "Child" and "Adult". Is there an option in MS Access to enter data into this column using a combo-box with these two values in Datasheet view?
The Simple (but questionable) solution:
(in strict accordance with OP's question)
Text
type.Lookup
tab page in the MS Access table designerDisplay Control
from TextBox
to Combo Box
Row Source Type
= Value List
Row Source
: Child,Adult
Since you probably want to leverage the fact that MS Access is a relational database, you could also have the have the Child
and Adult
alternatives as rows in a separate AgeCategory
table. In order to connect the rows in this table with your combo box you would have to use other Lookup settings. This I leave as an excercise to you.
EDIT: As HansUp is pointing out, it is really not a very good solution define this combo box lookup along with the table definition.
This is probably a better approach for a real world solution:
Datasheet View
. A form in Datasheet View
looks exactly like the type of row editor which you get when you double-click on a table.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With