Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: How do u add my the total no of repetition and use them as a chart


Message #1 by "Chan Sian Foo Roger" <rogerc@p...> on Fri, 9 Mar 2001 09:37:07
Hi i am using access to try to plot some graphs. the thing is lets say i 

have 2 fields one which is a date the other being a msg field which 

repeats many times. is there a way i can calculate the total repeating for 

one particular day and then send all these to a chart?

meaning i am plotting the occurence of the event in one day.

thanks!
Message #2 by Brian Skelton <brian_skelton@o...> on Fri, 9 Mar 2001 10:10:10 GMT
You need to add some totals to your query. The SQL will look 

something like this:



SELECT DateField, Count(MessageField) AS CountOfMessage

FROM TableName

GROUP BY DateField;



(Choose View|Totals to add a totals line to the query builder 

grid, which will allow you to select the totals functions you 

need from a list)



This will group your data by date and give you a count of all 

the different messages. You can then use this query as the 

basis for your graph.



Brian---- Original message ----

>Date: Fri, 9 Mar 2001 09:37:07

>From: "Chan Sian Foo Roger" <rogerc@p...>

>Subject: [access] How do u add my the total no of repetition 

and use them as a chart

>To: "Access" <access@p...>

>

>Hi i am using access to try to plot some graphs. the thing 

is lets say i 

>have 2 fields one which is a date the other being a msg 

field which 

>repeats many times. is there a way i can calculate the total 

repeating for 

>one particular day and then send all these to a chart?

>meaning i am plotting the occurence of the event in one day.

>thanks!
Message #3 by RPCABQ@a... on Fri, 9 Mar 2001 10:16:47 EST
Another way to do this is to not have a bound text box in the report, then 

call a function from the textbox 



In one your modules add a function that adds the values together and when the 

function is call from the textbox it will calculate adding together the 

current record and what you calculated from the previous time. Remember if 

you store the value in a var to make the var a Static or it loses it value 

each time you exit the function. Or add the value in the textbox to the value 

you pass the function



Function addit (fldToAdd as long) as long



addit = txtsumit + fldToAdd



End Function

Message #4 by "yuenkit" <janet_smith2000@y...> on Tue, 20 Mar 2001 16:47:52
yeah,

u can also use recordcount property.



Set objConn = server.CreateObject("ADODB.Connection")

strConn = your_connection_string

objConn.CursorLocation = adUseClient

objConn.Open strConn



Set objRS = server.CreateObject("ADODB.Recordset")

strSQL = your_SQL_statement

objRS.Open



Response.write objRS.RecordCount



is a pleasure 2 help ppl, wuahahaha :-)





> Hi i am using access to try to plot some graphs. the thing is lets say i 

> have 2 fields one which is a date the other being a msg field which 

> repeats many times. is there a way i can calculate the total repeating 

for 

> one particular day and then send all these to a chart?

> meaning i am plotting the occurence of the event in one day.

Message #5 by Kyle_Gaynor@b... on Tue, 20 Mar 2001 14:34:24 -0500



In reply to your chart. Can you use a CrossTab query to drive your chart with a

filter for the date to display



Kyle...






  Return to Index