Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box and Two Tables

Status
Not open for further replies.

Zuzia

Programmer
Jun 21, 2005
12
US
Hi,

I have a combo box using table1 data. When the user adds more data into the combo box it gets added to table1. How do I do the following:

Given that there are two different tables, table1 and table2, how do I append the data input in the combo box to table2 as well?

Thanks,
Z
 
my first question is, why are you storing the same data in two places? Breaks normalization rules (read document link below for more on normalization).

my second, how does the user add the data to table1?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Hello Leslie,

The reason for storing the data in two places is that that is what is required. I think it is just as silly, believe me.

To answer your second question, the user enters the data string directly into a combo box cboData that then enters it into Table1. So my question is now how to get the same data into Table2 as well.

Thanks,
Z
 
then there must be an event in the combo box (after_insert, maybe) that updates table 1, you will need to add something into that procedure that also adds the info to table 2.
 
Actually I realize that. The procedure that adds data to table1 from the combo box is "NotOnList". However I cannot use that for two tables at once. Let me know if you think of anything else.

Thanks,
Z
 
I cannot use that for two tables at once.

why not?

run the SQL command that inserts the information in table1
run a second SQL command that inserts the information in table2.

Now, I don't do much work in Access itself, but this doesn't seem like an improbable thing to do in the NotOnList event.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top