Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / November 2004

Tip: Looking for answers? Try searching our database.

How do I set up a relationship between items with multiple entrie.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cwissle - 30 Nov 2004 15:03 GMT
I am trying to set up a database for capital and expense coding for invoices.
I need to key one invoice with multiple lines of capital and expense codes.  
When I put the invoice number as the primary key, I am receiving errors and
can not run reports and queries.
Sprinks - 30 Nov 2004 15:49 GMT
Hi, Cwissle.

You will need two tables to accommodate the one-to-many relationship between
Invoices and "InvoiceEntries".  Something like:

Invoice
------------
InvoiceNumber   AutoNumber or Number (Primary Key)
InvoiceDate        Date
Customer           Number (Foreign Key to Customer table)
PaymentTerms   Number (Foreign Key to Terms table)
Etc.

InvoiceEntry
-----------------
EntryKey             AutoNumber (Primary Key)
InvoiceNumber    Number (Foreign Key to Invoices)
EntryCode           Number (Foreign Key to CapitalExpenseCodes)
Amount              Currency

Use a combo box for the Customer and EntryCode foreign keys, a continuous
subform for the InvoiceEntry records, placed on a main form based on Invoice,
linked by the InvoiceNumber.

HTH
Sprinks

> I am trying to set up a database for capital and expense coding for invoices.
>  I need to key one invoice with multiple lines of capital and expense codes.  
> When I put the invoice number as the primary key, I am receiving errors and
> can not run reports and queries.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.