Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > TechHelp > Directory > Access > Return Multiple Values > Return Multiple Values by Kevin Yip >
Back to Return Multiple Values    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Return Multiple Values
Kevin Yip 
     
15 hours ago
Among the various ways to return multiple values in a function that you covered in your video, my favorite is array because it is the only way that allows freedom in what the function can return.  All the other ways -- custom data type, class type, collection -- are pre-configurations that the user must adhere too.  For instance, if a custon type is set up to contain name, address, city, etc., then the function must return those.  If the user needs to return something different, say, title, suffix, etc., the data type must be rewritten, which will affect all the functions that use it.  In many situations, you just don't want to "locked into" that type of setup.  Hence, a variant array that doesn't have a pre-configured type seems to be the most flexible.  Any function that returns an array can declare it as whatever size and dimension required by the user.  The SAME function, with the use of an If...Then condition, can declare it as a one-dimensional numeric array or a multi-dimensional string array, depending on what the user needs.  The only downside is that an array, once declared, can only store one data type, i.e. all numeric, all string, etc.
Richard Rost  @Reply  
          
13 hours ago
A Variant array can actually hold mixed data types. For example, the Array() function returns a Variant containing an array of Variant elements, so one element can be a number, the next a string, and another a Date.

That flexibility is definitely useful, but it also means you lose some of the self-documenting benefit of named members. Six months later, remembering what Result(3) represents can be a little more challenging than Result.City. Like everything else, it's another Lego - great when the situation calls for it.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/15/2026 5:30:17 AM. PLT: 2s