Code for which option?
If you want to do your groups on the fly, you would create a new field in your query.
There are several ways to fill it:
* In the "Field" row in your query, use an Iif, long but not impossible:
GroupCode:Iif(Left$([MYFILE]![Name_Last],1) In ("A","B","C"),"1",Iif(([MYFILE]![Name_Last] In ("D","E","F"),"2", ......
* Build a little lookup table, with two fields. One is the field you are looking (the first letter of the last name), the other is the group code you will return. You'll have 26 table entries in the first field, and it should be indexed (A through Z). Do a Dlookup to find the code. This is nice if the user wants to be able to change the codes later, you can just have them maintain the table.
*Build a function that you would call at that point, and the function can return the grouping. This is useful if it takes a lot of messy code to get your groups. You could use a case structure here very nicely.