R
Ray V
I have a database in which I want to autonumber a Field based on the number
of occurances.
Say I have a database that holds calls for a client. (Table "CALLS"). This
database has a relationship to another table called "CLIENT". When I add a
new record to "CALLS" I want to autoincrement a number field (NUMCALLS) based
on the number of records allready stored in "CALLS" for the current client
for which I am adding a record.
It is like creating a Combo Box display control field with a row source
selection that looks like: "SELECT COUNT(*) + 1 FROM this.table WHERE
CLIENT.ID = CLIENT.ID"
Of course the above example doesn't work, otherwise I wouldn't ask this
question.
Or do I need to create a field in the CLIENT table that holds a count of
entries in CALLS and use that?
I hope this question makes sense.
Thanks,
Ray
of occurances.
Say I have a database that holds calls for a client. (Table "CALLS"). This
database has a relationship to another table called "CLIENT". When I add a
new record to "CALLS" I want to autoincrement a number field (NUMCALLS) based
on the number of records allready stored in "CALLS" for the current client
for which I am adding a record.
It is like creating a Combo Box display control field with a row source
selection that looks like: "SELECT COUNT(*) + 1 FROM this.table WHERE
CLIENT.ID = CLIENT.ID"
Of course the above example doesn't work, otherwise I wouldn't ask this
question.
Or do I need to create a field in the CLIENT table that holds a count of
entries in CALLS and use that?
I hope this question makes sense.
Thanks,
Ray