473,765 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table design question

This may be an easy question, but for some reason the multiple table design
idea is throwing me.

I'm trying to avoid using one large, wide table - so I've got multiple
tables that hold different categories of information about each record -
address information in one table, contact information in another table,
order-related information in a third, and so on.

The "Customer" table has an AutoNumber "Cust_ID" as a PK, which is the main
ID used throughout the database. Each ancillary table has it's own
AutoNumber ID field (e.g. Address_ID) as a PK, with the main Cust_ID as a
foreign key. I believe this is pretty standard normalization. I have
one-to-many relationships with referential integrity and cascading deletes
enabled on all these tables (the "One" side being Cust_ID in the Customer
form).

The problem I'm having is getting data into the tables. I have a
"NewRecord" popup form that is used for data entry. The user types in all
the different information in this one popup form and clicks OK - and the
data is supposed to find it's way to the different tables - address info to
the address table, name and company to the Contact table, etc.

I assume I need to use a query for the recordsource NewRecord Form. I tried
using subforms in the NewRecord form with each subform bound to it's
respective table, but that seemed like a kludge. But can I join 3 or 4
tables as a recordsource for a data entry form? The only purpose of the
NewRecord form is data entry - it opens on a new record, and closes with the
OK button. I got this to work with 2 tables, but not with more that that.
The problem is populating the other tables with the Cust_ID foreign key.
For example, when I enter a new record, the Customer table AutoNumbers that
new record as, say, 981 - how do I get that into the Cust_ID (foreign key)
field of the other tables? Can I write the foreign key to multiple tables
when using a query as a recordsource?

Thanks in advance.
Nov 12 '05 #1
2 2191
"deko" <de**@hotmail.c om> wrote in message
news:fP******** *********@newss vr27.news.prodi gy.com...
This may be an easy question, but for some reason the multiple table design idea is throwing me.

I'm trying to avoid using one large, wide table - so I've got multiple
tables that hold different categories of information about each record -
address information in one table, contact information in another table,
order-related information in a third, and so on.

The "Customer" table has an AutoNumber "Cust_ID" as a PK, which is the main ID used throughout the database. Each ancillary table has it's own
AutoNumber ID field (e.g. Address_ID) as a PK, with the main Cust_ID as a
foreign key. I believe this is pretty standard normalization. I have
one-to-many relationships with referential integrity and cascading deletes
enabled on all these tables (the "One" side being Cust_ID in the Customer
form).

The problem I'm having is getting data into the tables. I have a
"NewRecord" popup form that is used for data entry. The user types in all
the different information in this one popup form and clicks OK - and the
data is supposed to find it's way to the different tables - address info to the address table, name and company to the Contact table, etc.

I assume I need to use a query for the recordsource NewRecord Form. I tried using subforms in the NewRecord form with each subform bound to it's
respective table, but that seemed like a kludge. But can I join 3 or 4
tables as a recordsource for a data entry form? The only purpose of the
NewRecord form is data entry - it opens on a new record, and closes with the OK button. I got this to work with 2 tables, but not with more that that.
The problem is populating the other tables with the Cust_ID foreign key.
For example, when I enter a new record, the Customer table AutoNumbers that new record as, say, 981 - how do I get that into the Cust_ID (foreign key)
field of the other tables? Can I write the foreign key to multiple tables
when using a query as a recordsource?


Getting multi-table queries to be updateable is tough with a couple tables,
almost impossible with three or more (as you have found), The subforms idea
is not a kludge. It is the standard and recommended way to do this.

Nov 12 '05 #2
> Getting multi-table queries to be updateable is tough with a couple
tables,
almost impossible with three or more (as you have found), The subforms idea is not a kludge. It is the standard and recommended way to do this.


Thanks for the tip.

I suppose the only other alternative would be to use something like:

DoCmd.RunSql ("INSERT INTO tblOrders ( [Cust_ID] ) VALUES (" & Me!Cust_ID &
")")

In any case, I've reworked the form in question so that it uses subforms to
populate the different underlying tables. I've tried to make it look like
it's only one form by aligning the input fields using a transparent border
on the subform. The problem is Tab Order - how do I get the cursor to go to
and from the subform according to the intended design of the form?

[subForm_frmAddr ess]
Private Sub Country_KeyDown (KeyCode As Integer, Shift As Integer)
Forms!frmNewRec ord.cmdOK.SetFo cus
End Sub

This doesn't seem to work correctly... is there a better way to control Tab
Order between forms?
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5942
by: mr_burns | last post by:
hi, is the table percent value for height used for displaying in browsers. i have a table i want to run to the bottom of the screen so it seemed best to set the height value to 100%. when i display the table, it only sizes to the elements nested inside the table (as if no value for height has been given) and not to the bottom of the screen. i have also tried appling the height attribute as a css class but no joy.
0
1425
by: 2trax | last post by:
Hi all, I am trying to mimic the unix security model (users and groups) in a web app. I have thought of two ways of implementing this, but am unsure which would be better. The first design utilises three tables, while the second utilises two tables, however one of the columns in the first table is an an array.
15
2143
by: kimi | last post by:
I have just started working on a project that is partially complete. It is an application that is using access to store test results. The test results are being stored in two Access 2000 databases. DB #1 = StudentDB DB #2 = TestResulstsDB Why are there 2 dbs? I do not know - but that is one of the tings that we will be changing. Combining all of the data into one database.
5
3751
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for Office 2000. I am creating a database to track student athletes. I have created the following tables. The table title is to the far left, with fields under each. The common field will be the StudentID field, which is their student number assigned...
6
4849
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID SalesManName AT Alan Time
18
3800
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having trouble. I have tried keeping some of the fields bound and when I use the save button it has been saving as 2 different records. This is unacceptable. This is what I have, can anyone help me out with this?
7
4866
by: david | last post by:
I have asked this question before. But it does not work for me. Given radion buttons in the web form design page. What I did is described as follows. A panel control is dragged into the design form, and a table control is dragged into the panel from tooolbox. Add cells for the table through the properties. Now I cut a radio button, and click the table (note I can not select a cell), then right click Paste. The button is not in expected...
1
1511
by: Mark | last post by:
Hi there gurus, can you please add your 2 cents on this design? We're having trouble relating these tables in a diagram because of the keys. Is it necesary to have the references setup? I would assume yes so the forign keys can be setup. If you look at this link, you'll see our diagram. In Red are the relationships that we would like to make for referential integrity, but cannot because of the keys....
4
1970
by: yanjie.ma | last post by:
Hi, I've got a two part question on table and form design (sorry for the length but it takes a bit to explain). Our sales department uses a look-up table to help the them select the best equipment to use for a customer's needs. It basically consists of a table with the following setup: Equipment: Option1: Option2: Option3: Option 4: ... -------- ------- ------- -------- --------
54
4033
by: csolomon | last post by:
Hello: I was wondering if I could get some input on how to address a design issue, involving my composite table. I have one portion of my project complete. The following forms and reports I will add, piggyback off of my existing design. The part I have already completed allows my users to create a design sample; this is made up of several materials to create one sample. I have accomplished this using this design:
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.