Combo box in multiple tables within a database

F

forest8

Hi

I created several combo boxes for my database. There are multiple tables
within this database.

Not all combo boxes are in each table. But throughout the database, at least
two combo boxes are in each table.

When I use a combo box in the second table, no data is saved in the table
but it's in the form.

What am I doing wrong?

Thanks
 
J

Jeff Boyce

If you are using the "lookup" data type definition in your table structure,
you have (re-)discovered why so many here in the newsgroups hold "lookup"
fields in low regard.

The field (in the table) stores one thing (the rowID) but displays something
else (the looked-up value). This is confusing, no?!

The more common approach, and one less fraught with confusion, is to convert
those lookup fields to the data type of the underlying rowID, and only use
comboboxes in forms to do your looking-up.

Anyway, Access tables are not suitable for direct use -- they only store
data. Access forms are designed to display (and add/edit/...) data. Use
the forms, Luke!

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
C

carlos gouveia

forest8 said:
Hi

I created several combo boxes for my database. There are multiple tables
within this database.

Not all combo boxes are in each table. But throughout the database, at
least
two combo boxes are in each table.

When I use a combo box in the second table, no data is saved in the table
but it's in the form.

What am I doing wrong?

Thanks
 
J

John Vinson

forest8 said:
Hi

I created several combo boxes for my database. There are multiple tables
within this database.

Not all combo boxes are in each table. But throughout the database, at least
two combo boxes are in each table.

When I use a combo box in the second table, no data is saved in the table
but it's in the form.

What am I doing wrong?

Two things at least: using the misleading, misdesigned, and very limited
Lookup Wizard (see http://www.mvps.org/access/lookupfields.htm for a
critique); and (apparently) using tables for data editing and viewing instead
of forms.

A table *does not* contain a combo box. A Table can have a Long Integer
number field, a link to some other table (a lookup table, if you wish to call
it that); the combo box is a display tool, not a table value.

A Combo Box on a form (the place it should be used) has several relevant
properties; its RowSource is a Query which pulls data from a table; the Bound
Column is the field in that query which will be the combo's value when the
user makes a selection; the Control Source is the field into which that value
will be stored; there are other properties which can be useful (column count,
etc.)

What are the relevant properties of your combo boxes?
 

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