[AccessD] Loading checkbox values into an array

Susan Harkins ssharkins at gmail.com
Tue Dec 4 19:02:56 CST 2007


How about a collection?

I use collections now instead of arrays anytime I can.

Susan H.


> Give us a little more info.  Why do you need to load into an array?  An
> array of what?
>
> (air code)
>
> function LoadArray (ParamArray varCtls() as variant)
> dim ctl as control
> dim Arr(13) as variant
> dim intIndex as integer
> for each ctl in varCtls
> arr(intIndex) = ctl.value
> intindex+=1
> next ctl
> LoadArray = Arr
> end function
>
> ?LoadArray(Chk1, Chk2, Chk3 etc etc)(0)
>
> returns an array and displays the 0th element
>
> Something like that?
>
> You really should do some error checking to see how many objects varCtls
> contains in case you pass in 14 controls (you'd get a runtime error).
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim
> Sent: Tuesday, December 04, 2007 6:25 PM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Loading checkbox values into an array
>
>
> OK, this should be easy burt I guess its late and I can't recall how to do
> it.
> I have 13 checkboxes on a form. I need to load their values (true,
> false) into an array. Anyone want to jog my memory? TIA Jim Hale
>
>
> ***********************************************************************
> The information transmitted is intended solely for the individual or 
> entity
> to which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of or
> taking action in reliance upon this information by persons or entities 
> other
> than the intended recipient is prohibited.
> If you have received this email in error please contact the sender and
> delete the material from any computer. As a recipient of this email, you 
> are
> responsible for screening its contents and the contents of any attachments
> for the presence of viruses. No liability is accepted for any damages 
> caused
> by any virus transmitted by this email.
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list