Its a little long winded...
Its based around a football league website premise...
I have a Teams table and a Fixtures table.
The Teams table has Team_ID column for each team, the fixtures table has a Hometeam_ID column and an Awayteam_ID column.
The problem I have is relating the Hometeam_ID and Awayteam_ID columns to the single Team_ID column!!
Access wont let me create a relationship between Team_ID and both Home/Awayteam_ID due to the name.
So I thought that if I create two new columns in the Teams table (Hometeam_ID, Awayteam_ID) and give them the same values as Team_ID it wouild solve the relationship problem!
I'm not sure if this will meet all your objectives but try this.
In the Relationships window add the teams table to the window twice. You can then link the fixtures table to each copy of the Teams table using different fields.
That seems to have done the trick...
Only now I can only retrieve either the hometeam name or the away team name (as when joined, both have the field name Teamname).
Thanks anyway, will post this new problem in the sql section!
There is a reason why you would need to have the Autonumber field duplicated. I am using a form that upon a button click it transfers the recordsource to another table with identical layout. As the form i've created is extensive it would be a pain to have all of my code change depending on what record source i'm in. I would like the autonum field to be duplicated so that i can have a InProductID field and an OutProductID field so i can create apropriate relationships for. Also I know i can do this with some code but i dont want code to run everytime a record is inserted, plus with multi users it would create a mess. Does anyone have an idea?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.