S
Sienna
In my table tblLandLocations I want to create a field that I would use as a
primary key, but that takes information entered into other fields and then
concatonates them into a string which I would then use as a primary key. I'm
not sure if this is even possible, since each record would need to refer to
itself to create the entry for the primary key field.
Example. Three fields: [LandownerID], [LandLocation], [ManagementUnit]
In my form, the user chooses the landowner by name from a combo box, and the
LandownerID (an autonumber) is stored in this table. They enter a new
information for [LandLocation] and [ManagementUnit]. What I want, is to
create an unique identifier from this, say
LandLocationID: [LandownerID] & "_" & [LandLocation] & "_" [ManagementUnit]
This would then serve as a primary key (or at the very least, just another
field but with no duplicates allowed) to check that no land locations per
landowner and management unit have been entered more than once. Is this
possible? Or would I have to use a query to concatonate the strings, and go
from there? (and where do I go from there?)
Thanks for any help, I hope it's not too confusing!
primary key, but that takes information entered into other fields and then
concatonates them into a string which I would then use as a primary key. I'm
not sure if this is even possible, since each record would need to refer to
itself to create the entry for the primary key field.
Example. Three fields: [LandownerID], [LandLocation], [ManagementUnit]
In my form, the user chooses the landowner by name from a combo box, and the
LandownerID (an autonumber) is stored in this table. They enter a new
information for [LandLocation] and [ManagementUnit]. What I want, is to
create an unique identifier from this, say
LandLocationID: [LandownerID] & "_" & [LandLocation] & "_" [ManagementUnit]
This would then serve as a primary key (or at the very least, just another
field but with no duplicates allowed) to check that no land locations per
landowner and management unit have been entered more than once. Is this
possible? Or would I have to use a query to concatonate the strings, and go
from there? (and where do I go from there?)
Thanks for any help, I hope it's not too confusing!