Display records killing me...

Results 1 to 5 of 5

Thread: Display records killing me...

  1. #1
    Jb Guest

    Default Display records killing me...

    Here is the goal. I know how to display records, but not like this:<BR><BR>Envision 3 columns. 9 rows. I am paging 27 records but I don&#039t want ANY to appear until 27 are in the dp. The goal is to have<BR>a table "Members" And have it displayed as such:<BR><BR>member 1 2 3<BR><BR>(2 spaces down)<BR>4 5 6<BR><BR><BR>7 8 9<BR><BR>That pattern continues til <BR>25-27<BR><BR>But if the table &#039members&#039 has name/street/city/zip and I place each persons info in each box one at at time, how is that possible? In other words, once the 27th person fills out a form and it goes to the db as ID #27, for ex, the &#039view.asp&#039 page<BR>will show nothing UNTIL the 27th, and then in EACH BOX (Among 27 boxes from 9 rows/3 col&#039s) is EACH persons name/address...<BR><BR>Is THAT possible? Then I would page 27 per page. So if it&#039s 30, I&#039d see 27, and nothing more til 54, then it&#039ll have 2 pages of 27. The paging, I can handle, but not THIS. It would be INCREDIBLE to be able to do that.

  2. #2
    Join Date
    Dec 1969

    Default RE: Display records killing me...

    Why not just get the record count and base your display/nondisplay on that?<BR><BR>That is:<BR><BR>&#060;%<BR>&#039 I assume that "pageNumber" is already set to desired page...<BR>...<BR>RS.PageSize = 27<BR>...<BR>rc = RS.RecordCount<BR>maxRecNum = 27 * pageNumber<BR>If rc &#062;= maxRecNum Then<BR>&nbsp; &nbsp; RS.AbsolutePage = pageNumber<BR>&nbsp; &nbsp; ... display the 27 records ...<BR>End If<BR>...<BR>%&#062;<BR><BR>Usually, I don&#039t recommend using RecordCount, but in this case...<BR><BR>

  3. #3
    peterjl@austec.net.au Guest

    Default RE: Display records killing me...

    Sounds simple enough. You would use the RecordSet.ReocrdCount to determine how many members. <BR>nrec=rs.ReocrdCount<BR>Then do integer division to see how many full pages you have:<BR>nrec = nrec 27 &#039 Note: use instead of / for int division (3027 = 1)<BR>Page to the appropriate page and display your 27 members.<BR><BR><BR>However, why would you not want to display the last partially-filled page. You could use a HTML table layout with 3 columns and 9 rows. You could also use a for next loop to populate the table and leave the cells blank when the data does not exeist.

  4. #4
    JB Guest

    Default That is where I am confused...

    Yeah, that&#039s the tricky thing. First of all, thanks to both of you. Seriously.<BR><BR>But when I layout, let&#039s say, 27 &#039boxes&#039, you know (3 col&#039s by 9 row&#039s) and number each 1-27. I want to make sure that EXACT html format (Including spacing) allows name/address for ID1 in box 1, name/address for ID 2 in box 2...and so on.<BR><BR>BUt when I try looping and standard placing, I can never get id1 in box 1, while 2 in box 2. I just don&#039t know how to get that to work. I don&#039t know why, but for some reason placing record 1-27 in box 1-27 is hard for me. But placing a table and having a simple view.asp page with edit/delete is not. I still have a ways to go, certainly, but I can&#039t understand what I am doing to confuse this for myself.<BR><BR>I will consider teh suggestions, and any errors I will notify you so I can be more clear on this matter. <BR><BR>Thank you. I would kill for this, it&#039d be cool to say the least.

  5. #5
    Join Date
    Dec 1969

    Default What you might want to consider...

    ...is putting a &#060;TABLE&#062; *inside* each of the outer table cells, so that you can format each outer cell carefully.<BR><BR>Makes using all the fields of each record easier, as well. That is, all the fields of a given record *always* go into the INNER &#060;TABLE&#062; for one cell. <BR><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