A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table Using Relationship? VB or somethingelse?



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2004, 04:19 AM
QAS
external usenet poster
 
Posts: n/a
Default Table Using Relationship? VB or somethingelse?

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 TblDeptInfoepartmentName and then associate the right tax status
  #2  
Old July 10th, 2004, 11:01 AM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default Table Using Relationship? VB or somethingelse?

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 TblDeptInfoepartmentName and then
associate the right tax status
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Analyser and more... Mary Ann Database Design 2 June 29th, 2004 06:36 PM
resize table from A4 size to A5 ims New Users 3 June 9th, 2004 01:05 AM
COMPARE THE TWO TABLES Stefanie General Discussion 0 June 4th, 2004 04:36 PM


All times are GMT +1. The time now is 05:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.