Updating table via fom (combo box)

J

Joe

I thought I had this problem licked but apparently not. My database has one
table with many columns including a combo box with two columns (supplier name
and supplier number) I use a form based on the table to update/enter data
into the table. What I want to accomplish is to select a supplier’s name in
the combo box on the form and have the table update the supplier’s name and
number in separate columns in the table. How do I accomplish this?

Thank you.
 
W

Wayne-I-M

Hi Joe

Looking at your post I "think" you may have a lookup field in the table.
Don't use these.

Make a back up 1st.

Then use a form to add details to the table (don't work on the table
itself). If you want you can use the wizard to create a combo on your form
and set the source as the field in the table you want to store the results.
 
J

Joe

Thanks, Wayne. I will try your suggestion.

Joe

Wayne-I-M said:
Hi Joe

Looking at your post I "think" you may have a lookup field in the table.
Don't use these.

Make a back up 1st.

Then use a form to add details to the table (don't work on the table
itself). If you want you can use the wizard to create a combo on your form
and set the source as the field in the table you want to store the results.
 
D

Douglas J. Steele

Why? As in why would you want to store the data redundantly?

As long as you have the ID for the Supplier, you can look up the address
whenever you need it.
 
J

Joe

Hi Doug,

Thanks for your response. Actually, I do not want to do redundant storage.
However, when I select the supplier's name from the combo box, it only saves
on the form and not in the column in the table. That is why I am looking to
see if I am doing something incorrectly. Any ideas?

Thanks.

Joe
 
J

John W. Vinson

Thanks for your response. Actually, I do not want to do redundant storage.
However, when I select the supplier's name from the combo box, it only saves
on the form and not in the column in the table. That is why I am looking to
see if I am doing something incorrectly. Any ideas?

The table SHOULD contain only the ID.

It should NOT CONTAIN the name.

Tables are for data storage; for a field like this, what's stored is the link
to the table of supplier names. It is neither necessary nor prudent to store
the name in the table *at all*.

If you're routinely opening table datasheets to view or work with data...
don't. That's not their function! All interaction with data should be done
using Forms... where you *can* have combo boxes, extra textboxes displaying
names, etc.

John W. Vinson [MVP]
 
J

Joe

Thank you for you insight, John. As a point of clarification, I do not
routinely use the table or data sheet to view or work with info. My problem
here is simply trying to get the data entered into the form to save to a
particular field (supplier number) in the table, whch is not happening right
now.

Thanks, again,.

Joe
 
J

John W. Vinson

Thank you for you insight, John. As a point of clarification, I do not
routinely use the table or data sheet to view or work with info. My problem
here is simply trying to get the data entered into the form to save to a
particular field (supplier number) in the table, whch is not happening right
now.

Well, that's not what you asked: to quote

What I want to accomplish is to select a supplier’s name in
the combo box on the form and have the table update the supplier’s name and
number in separate columns in the table

Do you have a Combo Box on the Form? What is its RowSource (post the SQL if
you would)? What is its Bound Column (the column which will be stored)? What
is its Control Source?

John W. Vinson [MVP]
 

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