Posted on 2004-03-25
1) I'm having some problems with Type Arrays (mainly keeping a firm grasp on them in my mind while I code). This project is part of my college studies, so I'm looking for some suggestions on how to tackle this particular part. I've finished the algorithm in pseudocode, and it's is correct.
Part pseudocode for the function I am trying to code:
If all employees have been added to the Wages array
- Show warning message
- Call SaveWagePayment()
- Call cmdClearPayDet_Click()
My question is how exactly could you use a normal array to hold how many records have been added to a type array?
WageArray(1 to 10) - holds employees wage details defined as a type:
Private Type WAGE_RECORD_TYPE
lngEmployeeId As Long
intPayDate As Date
sngHoursWorked As Single
intWagesAddedCount - holds how many employees have been added to the WageArray
Now how the heck do I use an integer array, to keep a check of what records have been added to the type array? I cant get my head around it just yet, and I thought I should rather use a boolean array, and could store TRUE or FALSE in the elements - but my lecturer tells me it should be an integer type.
Please go easy on me, VB student (aspiring VB expert one day). I can post actual code if need be, but it's long.