chunk records

Results 1 to 3 of 3

Thread: chunk records

  1. #1
    Join Date
    Dec 1969

    Default chunk records

    I want to retrieve a recordset and order them on a page in alphebetical chunks e.g.<BR><BR>A<BR>Alex <BR>Alexia<BR>Ali<BR>Alison<BR>Amanda<BR><BR>B<BR> Ben<BR>Betty<BR>Bruce<BR><BR>etc.<BR><BR>How?

  2. #2
    Join Date
    Dec 1969

    Default How what?

    Have you searched? Tried?<BR><BR>Do an ORDER BY the name, that will get them in alphabetical order... Then test to see if the first letter has changed. If so, put up a header with the first letter in it.<BR><BR>If you need help on the ORDER BY statement, have a look at<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default RE: chunk records

    &#039;open recordset RS ordered by the FirstName field<BR><BR>DO UNTIL RS.EOF<BR> CurrentFirstLetter = LEFT(Rs("FirstName",1)<BR> <BR> IF CurrentFirstLetter &#060;&#062; FirstLetter THEN _<BR> Respons.Write CurrentFirstLetter & "&#060;BR/&#062;"<BR> <BR> Response.Write rs("FirstName") &#039;add the fields you want<BR> FirstLetter = CurrentFirstLetter<BR> RS.MoveNext<BR>LOOP<BR><BR>Of course the rs("FieldName") should be replaced by the fieldname you use.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts