Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting records with "letters"? 1

Status
Not open for further replies.

ISTodd

Technical User
Mar 25, 2004
43
US
Is it possible to have access assign a letter (A, B, C) to records in a list over a group in the detail of a report?

ie.
Currently:
1 Asia
2 Africa
3 Europe

Hoping for:
A Asia
B Africa
C Europe

Thanks for any help....
 
using CHR(), A = chr(65), B = chr(66) and so on.
If you'll be using this conversion in multiple places throughout your DB, you can write a function. But just to test it, in a query that is based on your table, you could put this (sub in your ID field name for CountryID):

Expr1: Chr(65+([CountryID]-1))

and it will convert; do you have fewer than 26 countries? If not, you'll have to write a function that doubles the letters to like "AA", "AB", etc. Hope this is enough to get you thinking.

g
 
Is the 1,2,3 derived using a running sum? If so, create a new text box and set its control source to:
=Chr(64 + txtRunSum)

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Thanks Duane, that was actually painless - Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top