5 hours ago5 hr I have. a file that has a part that deals wight flight distances. There is a table that has the distances in it. That table has four fields. City A, City B, Cities combined and Distance. In the related table, the user enters the starting and ending cities, and there is a field in the background that is a calculations that is City A & City B. So if it's Miami to Chicago, then that field would be MiamiChicago, and that is then the field that is related to the distance table by it's Cities Combined field. This means that for each city pair, there has to be two records, one for Miami to Chicago, and another for Chicago to Miami. I'd like to just add a second field that would combine the names of the cities in the opposite order, then in the relation, if either of the combined fields matches, use that distance. As it is, you have have it match multiple fields, where it says AND, but is there a way do OR?
4 hours ago4 hr An OR relationship is implemented using a single multi-key field. Instead of City A & City B make the calculation:List ( City A & City B ; City B & City A )Ideally there should be a separator between the 2 city names, e.g. City A & "|" & City B in both tables, in order to prevent false positives. Edited 4 hours ago4 hr by comment
59 minutes ago59 min Good. Note that in your case there is an alternative solution: make sure the two cities are combined in alphabetical order on both sides.
Create an account or sign in to comment