menu control array = what parameter data type? 
Author Message
 menu control array = what parameter data type?

Hi all,

I posted this in the vb.syntax NG the other day, but still don't have the
answer.

As a work-around, I wrote a method that fills up a string array, which means
the client programmer has to transfer the string array into their menu
control array.  It works, but I can't help but feel it really is a
work-around.  Does anybody know how to send a menu control array as an
argument to a Sub or Function, or even if it can be done?  Or has anybody
else tried and failed also?  Am I crazy for wanting to do this, and if so,
what should I be doing?

--
shron >^. . ^<
Opinions expressed are not necessarily those of TSI Incorporated or any of
its subsidiaries or affiliates.


Remove 'x' from for email address


Quote:
> But doesn't that mean that I would have to require their form to have a
> preconfigured menu control array (element 0) with a known name?  My
> understanding is that I can't just add a menu array on the fly.  And what
if
> they wanted two menus filled (with different record sets, of course) for
the
> same form?

> --
> shron >^. . ^<


> > I would just pass a form as an object, and let the method manipulate its
> > menus.


> > > I have a class that shields the programmer from the particulars of the
> > > database access.  I want the programmer to provide a menu control
array
> to a
> > > method in this class, and the method would empty and fill the menu
> control
> > > array with results from the database.

> > > I tried the suggestions from the earlier posts regarding control
arrays
> > > without success.  If I say the parameter data type is a Variant, I get
a
> > > runtime error "Object required" when assigning the caption of the 0-th
> menu
> > > element.  If I make it an Object, the ReDim call gives a compile error
> > > "Expected array".  If I make it an array of Objects, I get a "Type
> > > mismatch".

> > > What am I doing wrong - or better yet, how can I get this to work?

> > > --
> > > shron >^. . ^<
> > > Opinions expressed are not necessarily those of TSI Incorporated or
any
> of
> > > its subsidiaries or affiliates.


> > > Remove 'x' from for email address

> > --
> > Laura Meyerovich
> > Magnet Systems
> > phone (401) 742-1636
> > fax   (520) 438-5537

> > Visual Basic, MS Access, Crystal Reports, SQL Server, and ASP
independent
> consultant.
> > Development, system integration, database design and data conversions.



Mon, 07 Jul 2003 21:50:43 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. menu control array = what parameter data type?

2. Passing Array or a user defined data type as a parameter to a storedprocedure in Oracle

3. Passing Array or a user defined data type as a parameter to a storedprocedure in Oracle

4. passing data controls and control arrays as parameters

5. host data type in data environment command parameters

6. Convert array of value type to array of reference type

7. Arrays of user defined types as parameters

8. vb5 Passing an array of type MENU to a Sub

9. Passing Parameters to stored parameter queries using VB 5's Data Controls

10. data types in parameter query

11. VB 5.0 and Inter-language Data Type Conversions (COBOL) and Parameter Passing

12. Parameter Data Type

 

 
Powered by phpBB® Forum Software