I am trying to declare a public array, and assign values to the elements. I want to do the assigning in the same piece of code where I declare all the other Public Const values. But it doesn’t work which defeats the purpose, since I am going in the end to put this all into an lss file.
So, I declare in Declarations…
Public atype(9) as String
but I can’t go on to say
atype(0)=“a value”.
Any ideas please.
Subject: No code in declarations section
You cannot write code in the declaration section.You need to initialise the array in an event; for example the query open event of a form or the initialize event of the script library
Or define a class. The array would be a property of the class. The array is initialized in the constructor
Follow the singleton pattern if you need only a single instance of the class
Wim Stevens