I need to perform a certain task from a query in Access 2K and the “experts” at MS have told me that this can be done with a cusotm function. Problem is – I don’t know how to write one. I’ve tried with the Access Help – but I can’t seem to figure it out. I’ve racked my brains for other ways to do this and I can’t come up with anything that works. I need help ASAP on this!!Here’s what I need to do:
Each record contains the following fields: client, matter, category, description. I need to compare the client, matter and category fields from one record with those from the next record; if they are the same, I need to add an asterisk (*) and an incrementing number to the category field. Then I need to do the same comparison with the PREVIOUS record with the same results if they match. If all three don’t match (i.e., if only two match), then nothing is done. Here’s an example:
Client 1, Matter 1, Category 1.1, First
Client 1, Matter 1, Category 1.1, Second
Client 1, Matter 2, Category 1.1, Third
Client 2, Matter 1, Category 3.3, Fourth
Client 2, Matter 1, Category 3.3, Fifth
Client 2, Matter 1, Category 5.4, Sixth
Results would need to be:
Client 1, Matter 1, Category 1.1*1, First
Client 1, Matter 1, Category 1.1*2, Second
Client 1, Matter 2, Category 1.1, Third
Client 2, Matter 1, Category 3.3*1, Fourth
Client 2, Matter 1, Category 3.3*2, Fifth
Client 2, Matter 1, Category 5.4, Sixth
Any ideas?