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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Form Data To Two Tables

Status
Not open for further replies.

xmeb

Technical User
Jun 5, 2013
89
Hi:

I have a form that has approximately 20 text boxes and combo boxes that saves to a table. I need to add a couple more fields. I was reading about normalization and was wondering if I have a problem.

For instance, the user selects a primary location from one (and only one) of three combo boxes (areas/building/places, roads, and condominiums/lodging) and a secondary location (again, only one) from a similar group of four combo boxes. Should I have a separate table with two fields (primary location and secondary location) and save to it? If so, how would it best be done?

Thanks,

xmeb

 
If the data has to be recorded into 2 separate tables, you will need to use 2 recordsets in the form. That means making the form unbound.
 
How are ya xmeb . . .

In parallel with dhookom, we need to know whats in your tables and your table relationships ... first!

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
I have one table with about 20 fields and I thought it would be better to save related data (like locations) to a separate table. Thanks.
 
I have one table with about 20 fields and I thought it would be better to save related data (like locations) to a separate table. Thanks.
 
It depends on the relationship between the data in the table and the other data. If each record in the table you already have will have one record for the new data, I'd put it in the same table. If it's going to be a one to many situation, it should be in another table.
 
xmeb . . .

Sorry to get back so late.

xmeb said:
I was reading about normalization and was wondering if I have a problem.
Then you go on to say ...
xmeb said:
user selects a primary location from one (and only one) of three combo boxes (areas/building/places, roads, and condominiums/lodging) and a secondary location (again, only one) from a similar group of four combo boxes.
Forgive me but roads as a location completely flipped me out. You need to work on your table structure and relationships before questioning normalization. What these relationships are ... only you know.

Since this is a problem with structure, an expulsion of any relationships and how their defined is in order.

Your Thoughts . . .

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Yes, a road is very much a location. When we have a motor vehicle crash on a given road the location of the motor vehicle crash is the road. Cross streets and landmarks are used to identify exact locations on longer roads. There are other examples as well. Thanks.
 
xmeb . . .

Thats a new relationship on me (and I bet others). Soooo ... in words ... how are you defining the relatinship between primary & secondary locations?

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top