Okay, so I'm still learning by trial and error with Access 2010 so please take this to heart before yelling at me for using incorrect terminology (i'll catch on quick, I promise).
I have two tables that are related: BUCKETS & LOCATION
BUCKETS has these fields:
LOCATIONS has these fields:
What I'd like to have done is for LOCATIONS table to be aware of how many different cities there are. So for instance, if there is multiple location entries for the cities of Vancouver and Toronto in there, I want the LocationID to first know how many Torontos there are and in LocationID to combine the LocationCity and a count (starting from 1) to that field.
So for example, if there are three toronto locations and two vancouver locations, LocationID would have TO-01, TO-02, T0-03 for the Toronto locations and VAN-01, VAN-02 for Vancouver locations.
At first I had the expression of [LocationCity] & "-" & [LocationAutoID] in the Expression field in the Field Properties but I quickly realized that it wouldn't count the amount of cities but just add the autonumber and the city (which kind of works, but not ideally).
Any suggestions?
Much appreciated!
I have two tables that are related: BUCKETS & LOCATION
BUCKETS has these fields:
- ID (autonum)
- Type (type of bucket)
- Creation Date (when it was created)
- Operational (if it is operational or not (Yes/No).
- Location (Location of the bucket)
- Notes (notes)
LOCATIONS has these fields:
- LocationAutoID (Autonumber)
- LocationCity
- LocationID
- BucketsOnSite (can have multiple entries)
What I'd like to have done is for LOCATIONS table to be aware of how many different cities there are. So for instance, if there is multiple location entries for the cities of Vancouver and Toronto in there, I want the LocationID to first know how many Torontos there are and in LocationID to combine the LocationCity and a count (starting from 1) to that field.
So for example, if there are three toronto locations and two vancouver locations, LocationID would have TO-01, TO-02, T0-03 for the Toronto locations and VAN-01, VAN-02 for Vancouver locations.
At first I had the expression of [LocationCity] & "-" & [LocationAutoID] in the Expression field in the Field Properties but I quickly realized that it wouldn't count the amount of cities but just add the autonumber and the city (which kind of works, but not ideally).
Any suggestions?
Much appreciated!