Form field based on combo box not feeding into underlying table

G

Guest

I have a field in my form that populates based on a combo box. (User chooses
Product ID and Product Name automatically fills second field.) I used
=combobox.column(1) as the control source. How can I get the second field
(Product Name) information to then feed into the field in the underlying
table?

Thank you in advance for your time!
Denilynn
 
T

tina

recommend you don't. the point of a relational database is that you save
data only once, in one place - then you relate it to other data by linking
primary/foreign key values. as long as you're saving the ProductID in your
data table, you can retrieve the ProductName from the Products table anytime
you want to display it, by linking the ProductID fields in both tables.

hth
 
G

Guest

I wanted the information from the form to feed into the underlying table so I
could set up queries based on the table. Am I going about this the entirely
wrong way?
 
T

tina

you *can* set up queries based on the table. just link the two tables in a
query, on their respective ProductID fields. you can choose what fields from
*both* tables that you want the query to display. so the ProductName is
stored in only one place, the Products table - but you can display it
whenever you want to.

this is standard relational design structure. suggest you take a look at the
Northwind database that comes with Access, you'll see examples of pulling
data from linked tables. *important note*: ignore the use of Lookup fields
in the Northwind.mdb - you should not use Lookup fields in any tables. see
http://www.mvps.org/access/lookupfields.htm for reasons why.
also suggest you read up on relational data modeling, so you'll understand
how and why data is segregated into separate tables that are then linked
together. Access was designed specifically to support the relational data
model, so you'll get a lot more out of the software if you understand and
use those principles. see
http://home.bendbroadband.com/conradsystems/accessjunkie/resources.html for
many links to helpful information, beginning with the Starting Out and
Database Design 101 links.

hth
 

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