Results 1 to 6 of 6
  1. #1
    Ellpee is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    80

    Multi-dimensional/Multi-type Array

    Need to create arrays that have multiple dimensions (usually just 2) and can store multiple data types, such as a date and a string, or a long and a double. Also need to know how to retrieve that data when a procedure needs it. Have looked through hardcopy references available to me, and on line, but none specifically addresses this to a point where I understand it. Help, anyone? I suspect this involves declaring a type or collection, but not comfortable with my knowledge level on that.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    you no longer need arrays (old school) here in access. We have tables and collections.

  3. #3
    Ellpee is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    80
    So okay, substitute "collections" for arrays and tell me how to accomplish what I need with a collection ....

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Ranman256 -

    I must disagree with you on the use of arrays; they are not "old school". There are times when a good developer / programmer most definitely does need arrays, and they can be very useful for complex calculations. For applications which rely heavily on looking up data or do a lot of mathematical computation, but do not do a great deal of updating, proper use of arrays can speed up processing by an order of magnitude.

    You may not use arrays, but please don't be so dismissive of those who know how to use them.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I, too, use arrays on occasion. I haven't taken the time to learn about using collections, so arrays it is.


    If you create an array of type Variant, you can store dates, strings, longs, doubles, etc. (IIRC)
    Here are links to how to use arrays since they explain arrays better than I could:

    http://patorjk.com/programming/tutorials/vbarrays.htm
    http://www.utteraccess.com/wiki/index.php/Arrays
    http://sourcedaddy.com/ms-access/arrays.html
    https://msdn.microsoft.com/en-us/library/wak0wfyt.aspx

    Post back if you still have questions.

  6. #6
    Ellpee is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    80
    OK, will try that (type Variant).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 11-09-2014, 05:18 PM
  2. Replies: 1
    Last Post: 02-27-2014, 03:43 PM
  3. multi threading?
    By redbull in forum Programming
    Replies: 2
    Last Post: 01-03-2013, 02:16 PM
  4. Replies: 2
    Last Post: 08-31-2012, 02:20 PM
  5. Hot to set up Multi-UOM
    By cap.zadi in forum Database Design
    Replies: 3
    Last Post: 12-31-2011, 10:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums