Hi
I have created a database for my kids to keep track of their swim team races. We use this to keep track of their speeds by stroke, fastest times, averages, etc.
I am trying to add a new module, pulled from a form, created from a query, that will calculate if they have qualified for district championships or not. The module works fine, but I cannot write the calculated results back to the table. I think the problem is with my table relationships.
As set up I cannot write any data from my query results back to the table. I need to change some of my data fields to unique indexes to accomplish what I wish, but I don't see how to do that with my current structure.
I have four (4) tables:
tblSwimmer
SwimmerID (key)
GirlorBoy
etc
tblSwimTeam
SwimTeamID (key)
SwimmerID
AgeSwimmingAs
etc
tblIndividualRa ces
IndivRacesID (key)
SwimTeamID
Stroke
etc
tblQualifyingTi mes
QTID (key)
Sex
Age
Stroke
etc
As each swimmer can be on more than one swim team (different seasons) I have a one to many relation between tblSwimmer.Swim merID and tblSwimTeam.Swi mmerID, and as each swimmer will have many races for the team I have a one to many relation between tblSwimTeam.Swi mTeamID and tblIndivRaces.S wimTeamID.
When I create one to one relationships between tblQualifyingTi mes:sex and tblSwimmer:Girl orBoy, tbl QualifyingTimes :Age and tblSwimTeam:Age SwimmingAs, and tblQualifyingTi mes:Stroke and tblIndivRaces:S troke I get the correct results from my query but am unable to write anything back to my table. My problem is that Access wants the columns from the parent tables to be unique indexes, but I don't see how this is possible.
I have also tried writing a subquery to match up the correct QTID with IndivRacesID, but run into the same problem as above when I try to write this to my form. I have also tried putting QTID in tblIndividualRa ces but as it is null in that table initially I would have to write to that column.
Is there a better way to set up my relationships? Does anyone see a different workaround?
Thank You
Ivan
I have created a database for my kids to keep track of their swim team races. We use this to keep track of their speeds by stroke, fastest times, averages, etc.
I am trying to add a new module, pulled from a form, created from a query, that will calculate if they have qualified for district championships or not. The module works fine, but I cannot write the calculated results back to the table. I think the problem is with my table relationships.
As set up I cannot write any data from my query results back to the table. I need to change some of my data fields to unique indexes to accomplish what I wish, but I don't see how to do that with my current structure.
I have four (4) tables:
tblSwimmer
SwimmerID (key)
GirlorBoy
etc
tblSwimTeam
SwimTeamID (key)
SwimmerID
AgeSwimmingAs
etc
tblIndividualRa ces
IndivRacesID (key)
SwimTeamID
Stroke
etc
tblQualifyingTi mes
QTID (key)
Sex
Age
Stroke
etc
As each swimmer can be on more than one swim team (different seasons) I have a one to many relation between tblSwimmer.Swim merID and tblSwimTeam.Swi mmerID, and as each swimmer will have many races for the team I have a one to many relation between tblSwimTeam.Swi mTeamID and tblIndivRaces.S wimTeamID.
When I create one to one relationships between tblQualifyingTi mes:sex and tblSwimmer:Girl orBoy, tbl QualifyingTimes :Age and tblSwimTeam:Age SwimmingAs, and tblQualifyingTi mes:Stroke and tblIndivRaces:S troke I get the correct results from my query but am unable to write anything back to my table. My problem is that Access wants the columns from the parent tables to be unique indexes, but I don't see how this is possible.
I have also tried writing a subquery to match up the correct QTID with IndivRacesID, but run into the same problem as above when I try to write this to my form. I have also tried putting QTID in tblIndividualRa ces but as it is null in that table initially I would have to write to that column.
Is there a better way to set up my relationships? Does anyone see a different workaround?
Thank You
Ivan
Comment