D
Dale
I have a table that captures the occurence of an event by date and hour in a
24 hour period. Columns are named
[0100], [0200],[0300]....[2400].
I want to capture the sum of the events by days, evenings and nights where
"days" = ([0800]+[0900}...+[1500])
"evenings" = ([1700]+[1800]...+[2400])
I'm trying to create a function for each of "days", "evenings" etc,
I didn't want to have to declare each variable everytime I invoke the
function from a query, thinking an array is the way to go? I'm hopelessly
lost...can an array work with columns or only rows? How do I reference the
column I want in the array?
Function DaySum() As Double
Dim Days
Days = Array("[0800]", "[0900]"...."[1500]")
DaySum = Days(1) + Days(2)....+ Days(8)
End Function
If you're not already rolling on the floor laughing at this poor
attempt....thanks for any help or pointers.
24 hour period. Columns are named
[0100], [0200],[0300]....[2400].
I want to capture the sum of the events by days, evenings and nights where
"days" = ([0800]+[0900}...+[1500])
"evenings" = ([1700]+[1800]...+[2400])
I'm trying to create a function for each of "days", "evenings" etc,
I didn't want to have to declare each variable everytime I invoke the
function from a query, thinking an array is the way to go? I'm hopelessly
lost...can an array work with columns or only rows? How do I reference the
column I want in the array?
Function DaySum() As Double
Dim Days
Days = Array("[0800]", "[0900]"...."[1500]")
DaySum = Days(1) + Days(2)....+ Days(8)
End Function
If you're not already rolling on the floor laughing at this poor
attempt....thanks for any help or pointers.