473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dividing a recordset up for display?

I placed some code below...took out most of the unneeded html crap for
this.
this gives me a listing of phone charges...every other line with a
different color for easy reading.
What I want is this with all entries for the first "Service Number"
then a space then everything for the next "Service Number" on and on
until the end. Can someone tell me how to do this?

<table>
<tr>
<td>Service Number</td>
<td>Subscribe r</td>
<td>Description </td>
<td>To Number</td>
<td><div><b>Dur ation </td>
<td>Connect Date</td>
<td>Amount</td>
</tr>

<%
Dim sBackgroundColo r
sBackgroundColo r = "#ffffff"

Do until rs.eof

If rs("Service Number") <> "" Then
If sBackgroundColo r = "#ffffff" Then
sBackgroundColo r = "#f7f7f7"
Else
sBackgroundColo r = "#ffffff"
End If
%>

<tr bgcolor="<%=sBa ckgroundColor%> ">
<td><%=rs("Serv ice Number")%></td>
<td><%=rs("Subs criber User Name")%></td>
<td><%=rs("Desc ription")%></td>
<td><%=rs("To Number")%></td>
<td align="center"> <%=rs("Duration ")%></td>
<td><%=rs("Conn ect Date")%></td>
<td align="right">< %=rs("Total Charge")%></td>
</tr>

<% End If
rs.MoveNext
Loop %>
</table>

Feb 7 '06 #1
8 1261
Can you reword the quoted part below? I tried, but I don't really
understand what you're trying to do here.

Ray at work

<ey****@ncsa.ui uc.edu> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
What I want is this with all entries for the first "Service Number"
then a space then everything for the next "Service Number" on and on
until the end.

Feb 7 '06 #2
Yes, what I have gives me every entry for 555-1111 then every entry for
555-1112 then 555-1113 in one big table...this because my query sorted
on "Service Number" which is the telephone number. One big recordset.

I think I want some kind of loop to run threw this and get all the
entries for 555-1111 then a space...then the next time threw the loop I
get everything for the next number.
I want to do some calculations but I won't have a problem with that if
I get the loop

Feb 7 '06 #3
I'm not looking for someone to write script for me...I just need to
know what to do.

I'm guessing I need a for each loop here.
But how do I go about that...I've looked at some web samples but they
don't trigger anything in my super human intelligent brain :)

Feb 7 '06 #4
So, you're saying that you get:

555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1112 data data data
555-1112 data data data
555-1112 data data data
But what you want is:
555-1111 data data data
data data data
data data data
data data data
555-1112 data data data
data data data
data data data

If so, here's an option: http://www.aspfaq.com/show.asp?id=2241 Be sure to
read the whole page and not just grab the first code sample!

Ray at work

<ey****@ncsa.ui uc.edu> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Yes, what I have gives me every entry for 555-1111 then every entry for
555-1112 then 555-1113 in one big table...this because my query sorted
on "Service Number" which is the telephone number. One big recordset.

I think I want some kind of loop to run threw this and get all the
entries for 555-1111 then a space...then the next time threw the loop I
get everything for the next number.
I want to do some calculations but I won't have a problem with that if
I get the loop

Feb 7 '06 #5
Yes!

Feb 7 '06 #6
Thank You

Feb 7 '06 #7
ljb

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Og******** ******@TK2MSFTN GP11.phx.gbl...
So, you're saying that you get:

555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1111 data data data
555-1112 data data data
555-1112 data data data
555-1112 data data data
But what you want is:
555-1111 data data data
data data data
data data data
data data data
555-1112 data data data
data data data
data data data

If so, here's an option: http://www.aspfaq.com/show.asp?id=2241 Be sure to read the whole page and not just grab the first code sample!

Ray at work


My preference for doing this is to dump the entire record set into an array
with myarray = rs.getrows. That way I don't have to keep previous row values
in variables and check if they changed. All I do is check the current column
and row against the value on
if myarray(CurCol, CurRow) <> myarray(CurCol, CurRow -1) then...
Feb 8 '06 #8
If using classic ADO, you could also consider using a hierarchical (shaped)
recordset
Feb 8 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3240
by: Andie | last post by:
Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. Many thanks in advance. -- Andie
8
15242
by: Hung Huynh | last post by:
Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to work. For example, I have 10 records in my rsData recordset, and I issue this command rsData.Move 5, 1 'move to #5 from beginning
2
1782
by: Rob Meade | last post by:
Lo all, I have a local recordset which is not linked to a database. Some of the fields in this recordset contain html tags. I have a function which is called when I'm calculating my relevance for search results which gets the row from the recordset, strips out the html tags, then does its magic to produce the 'relevance' for that row.
8
2298
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be fine I think) that will say "I'm sorry but the data you requested cannot be found" or something along those lines.... This code is on an archive page I have on my company's intranet....The end result is to show 3 records at a time pulled from an...
25
10241
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
2
2323
by: Lyn | last post by:
Hi, I am opening a form in Continuous mode to list the records from a recordset created in the calling form. The recordset object is declared as Public and is set into the new form's Recordset property during the Open event. According to the VBA Help file, setting the Recordset property may adjust the RecordSource property accordingly. If I set the RecordSource to blank in Design mode, it remains blank when the form is opened even...
36
4469
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a dataview with a count = 0. Can someone explain why and how I might work around this problem? Here is the code for my function: Public Shared Function GetViewFromRS(ByVal pRS As ADODB.Recordset) _ As DataView
0
8999
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the Recordset? Does the Recordset support Bookmarks? Can we use the Find and/or Seek Methods with this Recordset? Does the Recordset support the use of Indexes? Will the Absoluteposition property be able to be used on this Recordset? etc....
2
5513
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my results page. - Recordset Paging works if no parameters are used in the recordset sql code (ie. simple sql code): SELECT * FROM db_name WHERE (db_field1 LIKE ‘%text1%’ OR db_field2 LIKE ‘%text2%’)
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.