Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default determining array with no bounds set?

I have a form that I use to collect parameters for a query table. All of the
queries have at least 4 parameters, but some that I'm starting to work on may
have more.

One report's code stream may run several queries, some of which will need
the additional parameters, and some of which will not.

So, I need the userform that comes up to collect all of the input
parameters, and then some of the queries to only use the first 4, and some to
use more. A start and end date that would apply to three of six queries, is
what I need to work on right now.

I've been thinking of using an array to tell the form how many additional
input boxes to put up, and their labels. For instance:

arParamList(0,0) = "Start Date:"
arParamList(0,1) = "text"
arParamList(1,0) = "End Date:"
arParamList(1,1) = "text"

could be used to put up two text boxes. The array would have been
dimensioned and defined, before the time when the form is shown.

If there are NO additional input boxes to be put up (no queries in that
report require more than the standard four), the arParmList would be empty...

dim arParmList() , but it would never have been redim'd and populated.

Is there a good way to tell if an array is not defined like that? OnError
would do it, but is there another better way?
Is there a way to tell when an array has been di

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default determining array with no bounds set?

another way to do what that needs is to just use a single Boolean to tell it
whether to bother with the other parameters.

Perhaps I'll persue that.

"mark" wrote:

I have a form that I use to collect parameters for a query table. All of the
queries have at least 4 parameters, but some that I'm starting to work on may
have more.

One report's code stream may run several queries, some of which will need
the additional parameters, and some of which will not.

So, I need the userform that comes up to collect all of the input
parameters, and then some of the queries to only use the first 4, and some to
use more. A start and end date that would apply to three of six queries, is
what I need to work on right now.

I've been thinking of using an array to tell the form how many additional
input boxes to put up, and their labels. For instance:

arParamList(0,0) = "Start Date:"
arParamList(0,1) = "text"
arParamList(1,0) = "End Date:"
arParamList(1,1) = "text"

could be used to put up two text boxes. The array would have been
dimensioned and defined, before the time when the form is shown.

If there are NO additional input boxes to be put up (no queries in that
report require more than the standard four), the arParmList would be empty...

dim arParmList() , but it would never have been redim'd and populated.

Is there a good way to tell if an array is not defined like that? OnError
would do it, but is there another better way?
Is there a way to tell when an array has been di

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining the size of an input array Tom Kreutz Excel Programming 7 March 6th 07 08:17 PM
Determining whether dynamic array has been used MDW Excel Programming 2 May 9th 06 02:45 AM
Determining number of values in an array (2 related questions) KR Excel Programming 3 March 4th 05 09:33 PM
Determining Array Limit Chaplain Doug Excel Programming 3 January 5th 05 01:37 AM
Upper/Lower Bounds [email protected] Excel Programming 0 January 8th 04 11:28 PM


All times are GMT +1. The time now is 12:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"