[AccessD] Syntax Problem with Array
Arthur Fuller
fuller.artful at gmail.com
Sat Nov 27 15:41:51 CST 2021
Thanks Gustav and Stuart. I just assumed that constant arrays were
supported.
On Sat, Nov 27, 2021 at 4:21 PM Gustav Brock via AccessD <
accessd at databaseadvisors.com> wrote:
> Hi Arthur
>
> Nothing wrong, only is this not VBA syntax.
>
> You can do something like:
>
> <code>
> Const LDoms As String = "31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30,
> 31"
> Dim LDom As Integer
>
> ’ Pick the 5th element.
> LDom = CInt(Split(LDoms, ",")(4))
>
> Debug.Print LDom
> </code>
>
> Fra: Arthur Fuller<mailto:fuller.artful at gmail.com>
> Sendt: 27. november 2021 21:34
> Til: Access Developers discussion and problem solving<mailto:
> accessd at databaseadvisors.com>
> Emne: [AccessD] Syntax Problem with Array
>
> 1. I'm trying to declare a Constant array. This is not working:
>
> Const LDoms() as Integer = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
> I get the same bad result if I use parentheses instead of curly braces.
>
> What am I doing wrong?
>
>
> --
> Arthur
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
Arthur
More information about the AccessD
mailing list