Database. Generate unique identifiers in a specific format

Hi,

I have a database table recording entries to four different events - a, b, c and d say. I would like to auto generate unique entry numbers of the form a1, a2, a3, … b1, b2, b3. Is this possible?

Graham

Would you be a bit more specific. What are the columns in your table? (One column for ‘a’ entry numbers, one for ‘b’ entry numbers, etc?). Are the numerical appendices of each set of entry numbers in each row ‘tied’ to the row ID number (say, a1, b,1, c1, d1 for row ID=1… etc.)? More information would help.

Table rows correspont to individual event entrants with fields such as name, address etc. One field is “Event Name” with values constrained to be “a”, “b”, c", or “d” for the four events. I want to allocate entrants with “competitor ids” of the form a1, a2 … b1, b2, b3 … I would like to have a column called “Competitor Id” to hold instances of these. E.g.

Competitor Id: b4
Event Name: b
Name: Fred Smith
etc.

Graham