Table Using Relationship? VB or somethingelse?

Q

QAS

I am trying to track sales for a C-store. There are 12 departments, some are taxable some are not. how can i go about creating a table or two where when pulled by a form the calculations should already know if it is taxable or not.

right now i have 2 tables

TblDeptInfo:
DepartmentName; Text
DepartmentTaxablel Yes / No

TblDailySales:
Date
dept01; currency
dept02; currency
......
dept12; currency

Now i can not figure out how to link TblDailySales:dept01 .... :dept12 to TblDeptInfo:DepartmentName and then associate the right tax status
 
G

Gerald Stanley

I definitely recommend that you 'normalise' TblDailySales
so that one row relates to only one department. I would
also recommend that you add a primaryKey column to
TblDeptInfo which would then act as a Foreign Key on
TblDailySales.
So my tables would look like

TblDeptInfo:
DepartmentId; AutoNumber - PrimaryKey
DepartmentName; Text
DepartmentTaxablel Yes / No

TblDailySales:
SalesDate; Date/Time
DepartmentId; Number - Foreign Key to TblDeptInfo
Sales; currency

The link between the two tables is a simple INNER join on
DepartmentId

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I am trying to track sales for a C-store. There are 12
departments, some are taxable some are not. how can i go
about creating a table or two where when pulled by a form
the calculations should already know if it is taxable or not.
right now i have 2 tables

TblDeptInfo:
DepartmentName; Text
DepartmentTaxablel Yes / No

TblDailySales:
Date
dept01; currency
dept02; currency
......
dept12; currency

Now i can not figure out how to link TblDailySales:dept01
..... :dept12 to TblDeptInfo:DepartmentName and then
associate the right tax status
 

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