Re: Use record number of subform to assign letters
by "Ken Snell \(MVP\)" <kthsneisllis9@[EMAIL PROTECTED]
>
Aug 8, 2008 at 12:34 PM
Assuming that you're using a query as the subform's RecordSource, add a
calculated field to the query that will give you the desired letter:
SELECT ID, [Record Number], Chr(63 + [Record Number]) AS Letter
FROM YourTableName
ORDER BY [RecordN Number];
--
Ken Snell
<MS ACCESS MVP>
"Access Newbie Nick" <AccessNewbieNick@[EMAIL PROTECTED]
> wrote in
message news:0E72520B-5B74-4712-A414-8A9D1BAD93E5@[EMAIL PROTECTED]
>I have a subform in which each record has a letter starting from A and
> preceding alphabetically. I want to make it so that if one record in the
> subform is deleted, the letters will automatically change to accomodate
it
> with no gaps.
>
> For example
>
> ID Record Number(in subform) Letter
> 34 1 A
> 35 2 B <-----
> delete this record
> 36 3 C
>
> then goes to
>
> ID Record Number(in subform) Letter
> 34 1 A
> 36 2 B
<-------
> auto changed assigned letter
>
> Any help given would be great!
>
> Thanks