PC Review


Reply
Thread Tools Rate Thread

determining array with no bounds set?

 
 
=?Utf-8?B?bWFyaw==?=
Guest
Posts: n/a
 
      22nd Jun 2007
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 With Quote
 
 
 
 
=?Utf-8?B?bWFyaw==?=
Guest
Posts: n/a
 
      22nd Jun 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
array index out of bounds Cnewman65 Microsoft Outlook 1 22nd May 2009 01:35 PM
Array bounds Bill Microsoft Access Form Coding 5 29th Jul 2006 09:17 PM
index was outside the bounds of the array =?Utf-8?B?ZGVubmlzdDY4NQ==?= Microsoft Access Database Table Design 1 15th Sep 2005 09:02 AM
Index was outside the bounds of the array. Steve McLellan Microsoft VC .NET 0 25th Mar 2004 01:07 PM
Array index out of bounds Ken Rinaman Microsoft Outlook Discussion 1 18th Sep 2003 07:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:51 AM.