|
-
Sep 27th, 2001, 11:12 AM
#1
Thread Starter
Addicted Member
Array of option button
Hi,
Here is what I'm trying to do:
In Main Form I have a list box and 2 commands ADD & DISPLAY.
If I want to add or display info of an Item in the list box, I will call the Info Form. I don't problem to add or display all the info of the info form(ie Text, combo, list...) but not the Option button. It save only the last option I chose.
here is my code:
cmdAdd_Click:
With frmMain.lstStudent
.AddItem txtStudentName
strKey = mStudents.NextStudentCode
.ItemData(.NewIndex) = Val(strKey)
End With
'add student object to collection, setting the key
mStudents.Add txtStudentName, cboSchool, _
lstMajor, ------>optLevel.Item(intIndex), _
txtUnitsCompleted, strKey
cmdDisplay_Click:
Dim intIndex As Integer
With mStudents.Item(mstrKey)
txtStudentName = .StudentName
cboSchool = .School
lstMajor = .Major
---> optLevel.Item(intIndex) = .GradeLevel
txtUnitsCompleted = .UnitsCompleted
End With
I have a student class and collection of students in the module classes
Can someone help me out please???
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|