Hola
estoy haciendo un pequeño proyecto en visual basic 6.0
cuando guarda los datos me los guarda bien
el problema que tengo del proyecto es que no me lee los options buttons los demas valores si los lee
hay dos frame
------------------------ ----------------------------
0 option1 label7 0 option2 label9
0 option1 label8 0 option2 label10
------------------------- ------------------------------
text6.text text7.text
aqui dejo el codigo
Public Sub limpiar()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text1.SetFocus
End Sub
Private Sub Command1_Click()
Dim mat As String * 7
Dim nom As String * 30
Dim postnom As String * 30
Dim sexe As String * 10
Dim price As String * 10
Dim datenaiss As String * 10
Dim adresse As String * 40
mat = Text1
nom = Text2
postnom = Text3
datenaiss = Text4
adresse = Text5
sexe = Text6.Text
price = Text7.Text
Open App.Path & "\fichero estudiante\" & (nom + ".txt") For Output As #1
Write #1, mat, nom, postnom, Option1(0).Value, Option1(1).Value, sexe, Option2(0).Value, Option2(1).Value, price, datenaiss, adresse
Close #1
MsgBox "Guardado exitosamente !", vbInformation, "Gestion Estudiante"
limpiar
End Sub
Private Sub Command2_Click()
limpiar
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Dim F_check1, F_check2, F_check3, F_check4 As Integer
cd1.InitDir = App.Path & "\fichero estudiante\"
cd1.ShowOpen
Open cd1.FileName For Input As #1
Do While EOF(1) <> -1
Input #1, mat, nom, postnom, F_check1, F_check2, sexe, F_check3, F_check4, price, datenaiss, adresse
Text1 = mat
Text2 = nom
Text3 = postnom
Text4 = datenaiss
Text5 = adresse
If Option1(Index).Value = True Then
Option1(0).Caption = F_check1
Text6.Text = sexe
Else
Option1(1).Caption = F_check2
Text6.Text = sexe
End If
Text6.Text = sexe
If Option2(Index).Value = True Then
Option2(0).Caption = F_check3
Else
Option2(1).Caption = F_check4
End If
Text7.Text = price
Loop
Close #1
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0: Text6.Text = Label7.Caption
Case 1: Text6.Text = Label8.Caption
End Select
End Sub
Private Sub Option2_Click(Index As Integer)
Select Case Index
Case 0: Text7.Text = Label9.Caption
Case 1: Text7.Text = Label10.Caption
End Select
End Sub
gracias