nutthick Posted February 8, 2005 Posted February 8, 2005 I have a Football Match dB storing games played in competitions all over the world. Each match takes place at a venue in a country. When the user enters data, they enter a competition (Comp table) specifying the country in which it was held (from the Country table). They then enter a match for the competition (Match table) from where they select a venue, via a valuelist (from the Venue table). What I want to do is only display the venues for the country the game was played in. At the moment I can either display all values from the Venue table or nothing. My relationships are screwed up, but I can't figure out how to do correct it. Does anyone have any ideas? Thanks
transpower Posted February 8, 2005 Posted February 8, 2005 Link the country field in Venue to the country field in Comp. Make the value list of the venue be based on the fields in Venue but show only related.
nutthick Posted February 8, 2005 Author Posted February 8, 2005 transpower - That's how I have it at the moment, but with no luck. My value list is related to the Country table. The relationships I have at the momment are Match to Competition (CompID), Match to Venue (VenueID) and Venue to Country (CountryID). Competition also gets it's country info from the Country table. I think this could just be a product of too many hours infront of the screen.
stanley Posted February 8, 2005 Posted February 8, 2005 In your Venue table, do you have the country each venue is in? If so, you base a relationship on the country chosen in your Competition (if I have that right) table, and your value list (based on that relationship) will show the venues in that country. Also, you could base your country list on that same table (show all values from Country field.) -Stanley
nutthick Posted February 9, 2005 Author Posted February 9, 2005 Thanks for your help, but still no luck. I've attached a file with the same relationships that I've been trying to get working, with the problem on the matches layout. If someone could point out what I'm doing wrong I'd appreciate it. Relationships.zip
andygaunt Posted February 9, 2005 Posted February 9, 2005 Hi - Your relationships were almost there. Unfortunately you were trying to pull a related set of values through a relationship that did not have any current values (since it was the field you were trying to colect) I moved the venues relationship to come off of the compettions TO based on country ID. Then your value list was set to pull the vvalues from the ID and Name fields based on the Competitions TO. I have attached the file back for you changed. HTH Relationships.zip
nutthick Posted February 9, 2005 Author Posted February 9, 2005 Thanks andygaunt that got it working. None of my books cover those sort of relationships in any detail. It's nice to get a working example running.
Recommended Posts
This topic is 7285 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now