RainLover
VIP From a land downunder
- Local time
- Today, 12:15
- Joined
- Jan 5, 2009
- Messages
- 5,041
plog
I can't allow a challenge like that go unanswered. You have stated that one should never use a query as a record source for a table. I have never heard of this before. I was wondering if you knew something I did not.
It we build the First table of our database it may look like this. I shall keep this overly simple.
tblEmployees
EmployeePK AutoNumber
FirstName Text
MiddleName Text
LastName Text
AddressLine1 Text
AddressLine2 Text
DOB Date
Up to now all of these fields belong in tblEmployees. I don't think anyone would disagree so far. So now lets add some repeating Data.
CityFK Number Long
So we have one table with One Foreign Key. We need a Second Table
tblCities
CityPK AutoNumber
City Text
PostalCode Text
State Text. This should actually be pushed out into a third Table in order to comply with normalisation.
Next thing I want a Form with all the above information plus a sub Form that holds some other information that is related to the Employee. We could have Jobs completed. I would need
A Primary Key Autonumber, JobNumber which would be a foreign key to yet another Table. DateCompleted, HoursTaken and say Comments.
We could keep going but this should be enough to demonstrate my design preferences.
In order to create the Main form I would need Data from tblEmployees, tblCities and perhaps a third table if you wanted to include a state.
You Said No Queries. I say you can't design a form that is properly Normalised as I just did without joining two tables with the aid of a Query.
I wrote this rather quickly. I hope I said things right.
I can't allow a challenge like that go unanswered. You have stated that one should never use a query as a record source for a table. I have never heard of this before. I was wondering if you knew something I did not.
It we build the First table of our database it may look like this. I shall keep this overly simple.
tblEmployees
EmployeePK AutoNumber
FirstName Text
MiddleName Text
LastName Text
AddressLine1 Text
AddressLine2 Text
DOB Date
Up to now all of these fields belong in tblEmployees. I don't think anyone would disagree so far. So now lets add some repeating Data.
CityFK Number Long
So we have one table with One Foreign Key. We need a Second Table
tblCities
CityPK AutoNumber
City Text
PostalCode Text
State Text. This should actually be pushed out into a third Table in order to comply with normalisation.
Next thing I want a Form with all the above information plus a sub Form that holds some other information that is related to the Employee. We could have Jobs completed. I would need
A Primary Key Autonumber, JobNumber which would be a foreign key to yet another Table. DateCompleted, HoursTaken and say Comments.
We could keep going but this should be enough to demonstrate my design preferences.
In order to create the Main form I would need Data from tblEmployees, tblCities and perhaps a third table if you wanted to include a state.
You Said No Queries. I say you can't design a form that is properly Normalised as I just did without joining two tables with the aid of a Query.
I wrote this rather quickly. I hope I said things right.