Solved

Array of user defined (Type)

Posted on 2000-04-19
4
168 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 100 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 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now