Compile Error: Expected end of statement

tranchemontaigne

Registered User.
Local time
Today, 04:40
Joined
Aug 12, 2008
Messages
203
I have a code block that fails to compile when a multi-dimentional array is defined.

This sample code compiles without error
'labels = Array( _
Array( _
Array("a", "b"), _
Array("aa", "bb") _
), _
Array( _
Array("c"), _
Array("ca", "cb", "cc", "cd") _
) _
)

but the code below fails at the comma within every "), "

Where am I going wrong?

'labels = Array( _
Array( _
Array("SAU", "Name", "Week Ending"), "MMWR Week No."), _
Array("") _
), _
Array( _
Array("Student", "Staff", "Combined", "Student ILI", "Staff ILI", "Comb. ILI"), _
Array("# Abs", "% Abs") _
), _
Array( _
Array("ILI / Total Abs"), _
Array("Std", "Staff", "Comb.") _
), _
Array( _
Array("Nurse Visits"), _
Array("Total", "% Std"), _
), _
Array( _
Array("ILI Nurse Visits"), _
Array("Total", "% Tot", "% ILI") _
) _
)
________
Ford Thames 300E History
 
Last edited:
I aint no wiz at arrays... but... You can only use so many continuations, try reducing the number of _ used.... see if that helps

Also it looks to me like...
Array("SAU", "Name", "Week Ending"), "MMWR Week No."), _
Has the bolded ) to many,but then again, like I said, dont know anything about Arrays :(
 
Thanks for the suggestion. Normally MS Access will pop an error explicitly stating that there are too many continuations...

I eliminated all continuations and made one very long line of code. Unfortunately the "Compile Error Expected end of statement" persists...
________
Oregon Dispensaries
 
Last edited:
Looks very familiar :)

Also it looks to me like...
Array("SAU", "Name", "Week Ending"), "MMWR Week No."), _
Has the bolded ) to many,but then again, like I said, dont know anything about Arrays :(
 

Users who are viewing this thread

Back
Top Bottom