Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array within a class? 1

Status
Not open for further replies.

thornmastr

Programmer
Feb 2, 2002
1,337
US
I have a form used to accept search parameters for an automobile parts inventory program. The form has three combo boxes and one list box. One combo box list auto year from 1953 to the current year. The second combo is the automobile Make, i.e.,, Ford, Dodge, etc. This has 37 items. The third combo box is the number of models associated with the make chosen in combo box 2. The list box is the products list which holds 7000 items and can have multiple selections. I have to save the last search criteria selected as it is possible the clerk will have to use that as the basis of a second search. I would like to use a class to save this information. The structure should be based on the following:

ClassItem
sYear as string
sMake as string
smodel as string
sCategories() as string

My question is within a class structure how do I define an array of strings. For that matter, how do I define an array of anything in a class and, once that is done, how do I reference an element in that array to both get and let values.

Thank you for your assistance.

Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net
 
While you can define the array of string within the class, addressing is a bit weird / different (requires using an Underscore vs. the Dot ooerator in specific location)

An easier (in MY opinion) alternative is the use of a UDF.

Of course if the number of elements gets quite large the array would be easier to define and, perhaps, even to address.





MichaelRed


 
Michael,

Do you mean UDT or UDF? If you mean function, please explan a tad further if possible.

Thanks.

Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net
 
Sorry, should have been the UDT. At my age / eyesight / coordination, I should probably avoid giving any advice, let alone via keyboard.








MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top