Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Array of user defined (Type)

Posted on 2000-04-19
4
Medium Priority
?
175 Views
Last Modified: 2010-05-02
I want to creat a project  that analyze an income survey.  The statistics for each home include ID number, number of members in the house hold, and yearly income.  As the data is  entered, they should be assigned to text boxes to the element of a user defined type.

The Report for the project will be sent to the printer and icludes the following:

It has three columns and 14 rows.

earth2d
0
Comment
Question by:earth2d
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 300 total points
ID: 2731821
Public Type income
    ID(0 To 13) As Variant
    numbMembers(0 To 13) As Variant
    yrIncome(0 To 13) As Variant
End Type


Dim counter As Integer 'keep track of how many values have been entered
Dim newInc As income

Private Sub cmdEnter_Click()
    newInc.ID(counter) = txtID.Text
    newInc.numbMembers(counter) = txtMem.Text
    newInc.yrIncome(counter) = txtIncome.Text
    counter = counter + 1
End Sub

is that what you are asking?  I wasnt sure what your real question was.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 2731858
Sounds like homework!!!
0
 

Author Comment

by:earth2d
ID: 2732999
Option Explict
I think I am looking for something like this.
Dim intRow            As Integer
Dim intCol              As Integer

Private Type Survey
intIDNumber          As Interger
curAnnualSalary    As Currency
intPersons             As Integer
End Type

Then something like 3 combo boxes for input such
as this

cboSurvey(0)
cboSurvey(1)
cboSurvey(2)   'For Arrays

input data using
lstSurvey.AddItem    txtSurvey.Text
Etc Etc
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2733006
earth2d writes:
"I think I am looking for something like this."

Until you know what you want we wont be able to help you.  Even with your description above I dont know what it is you want.  All of a sudden there are comboboxes and a listbox. Please be more specific.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question