A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Graphing an Array



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 06:59 PM
external usenet poster
 
Posts: n/a
Default Graphing an Array

Hi all,

I have stored a bunch of numbers in an array through VBA. I would like to
turn this array into a graph.

I have managed to save the array to a text file and import that file into
Excel from where I can graph it.

Unfortunately this is cumbersome - I would like to automate the process. Any
ideas how........

Thanks

Kenny


  #2  
Old July 14th, 2004, 07:32 PM
PC Datesheet
external usenet poster
 
Posts: n/a
Default Graphing an Array

Kenny,

I suggest a different approach to what you are doing!

If you need to store the numbers permanently, they need to be stored in a table.
You can then use a query to return the specific numbers you need and easily
graph the numbers in Access.

If the numbers already exist in your database, you need to create a query that
returns the specific numbers you need and then again easily graph the numbers in
Access.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications

www.pcdatasheet.com


Kenny wrote in message ...
Hi all,

I have stored a bunch of numbers in an array through VBA. I would like to
turn this array into a graph.

I have managed to save the array to a text file and import that file into
Excel from where I can graph it.

Unfortunately this is cumbersome - I would like to automate the process. Any
ideas how........

Thanks

Kenny




  #3  
Old July 15th, 2004, 03:30 AM
external usenet poster
 
Posts: n/a
Default Graphing an Array

Hi PC,

Thanks. You may be right, although I will have to go experiment a bit. To
give you more background.........

The numbers are already stored in a table. They are the number of hours
worked each day by employees.

The array is used to calculate a moving total of any number of days. So for
example, I can have a moving total of how many hours a guy has worked over
the last 7 days.

So if a guy has worked 1 hour a day, after 7 days his total is 7 hours. The
array then takes each day from day 1 in the database and looks back 7 days
to see what his total is. Then it goes to day 2, and 3 and so on.

If I get what you are saying............I might have to have an additional
column that will carry that figure, instead of trying to calculate it from
existing data?

Ok thanks let me know your thoughts.

Kenny


  #4  
Old July 15th, 2004, 05:56 AM
PC Datasheet
external usenet poster
 
Posts: n/a
Default Graphing an Array

Kenny,

You don't need an extra field in your table for the running total. You can use a
query and calculate it on the fly and then graph the numbers returned by the
query.

Steve
PC Datasheet


Kenny wrote in message ...
Hi PC,

Thanks. You may be right, although I will have to go experiment a bit. To
give you more background.........

The numbers are already stored in a table. They are the number of hours
worked each day by employees.

The array is used to calculate a moving total of any number of days. So for
example, I can have a moving total of how many hours a guy has worked over
the last 7 days.

So if a guy has worked 1 hour a day, after 7 days his total is 7 hours. The
array then takes each day from day 1 in the database and looks back 7 days
to see what his total is. Then it goes to day 2, and 3 and so on.

If I get what you are saying............I might have to have an additional
column that will carry that figure, instead of trying to calculate it from
existing data?

Ok thanks let me know your thoughts.

Kenny




  #5  
Old July 15th, 2004, 11:04 AM
external usenet poster
 
Posts: n/a
Default Graphing an Array

Hi Steve,

I get what you are saying........I am just not sure I could generate such a
complex query.

It is not a running total as such........more of a moving total. The query
would have to add 1 days' figures to the total and then subtract another
days' figures(as it falls outside the period).

On top of this the query would have to examine every date, not just dates
for which there is data.

Is it possible to write the array to a table and then query and graph the
table?

Ok. Thanks for the help.

Kenny


  #6  
Old July 15th, 2004, 11:04 AM
external usenet poster
 
Posts: n/a
Default Graphing an Array

Hi Steve,

I get what you are saying........I am just not sure I could generate such a
complex query.

It is not a running total as such........more of a moving total. The query
would have to add 1 days' figures to the total and then subtract another
days' figures(as it falls outside the period).

On top of this the query would have to examine every date, not just dates
for which there is data.

Is it possible to write the array to a table and then query and graph the
table?

Ok. Thanks for the help.

Kenny


  #7  
Old July 15th, 2004, 11:04 AM
external usenet poster
 
Posts: n/a
Default Graphing an Array

Hi Steve,

I get what you are saying........I am just not sure I could generate such a
complex query.

It is not a running total as such........more of a moving total. The query
would have to add 1 days' figures to the total and then subtract another
days' figures(as it falls outside the period).

On top of this the query would have to examine every date, not just dates
for which there is data.

Is it possible to write the array to a table and then query and graph the
table?

Ok. Thanks for the help.

Kenny


  #8  
Old July 15th, 2004, 02:47 PM
John
external usenet poster
 
Posts: n/a
Default Graphing an Array

Kenny,

Look at MS Knowledge Base Articles 208714 and 290136.

Steve


Kenny wrote in message ...
Hi Steve,

I get what you are saying........I am just not sure I could generate such a
complex query.

It is not a running total as such........more of a moving total. The query
would have to add 1 days' figures to the total and then subtract another
days' figures(as it falls outside the period).

On top of this the query would have to examine every date, not just dates
for which there is data.

Is it possible to write the array to a table and then query and graph the
table?

Ok. Thanks for the help.

Kenny




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing ARRAY elements with RANGE data and created a 2nd array JimP Worksheet Functions 2 March 10th, 2004 08:29 PM
Array reference from current row to bottom of column JM Worksheet Functions 0 February 26th, 2004 02:09 PM
Question on Array Formula John Worksheet Functions 1 February 21st, 2004 06:40 PM
Excel Array Formula John Telly Worksheet Functions 3 February 21st, 2004 02:16 PM


All times are GMT +1. The time now is 11:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.