Private Type musteri
kodu As Integer
adi_soyadi As String * 30
grubu As String * 10
adresi As String * 30
ilçe As String * 10
il As String * 10
telefon As String * 10
fax As String * 10
End Type
Dim kayit As musteri
Private Sub Command1_Click()
Open "C:\musteri.dat" For Random As #1 Len = Len(kayit)
kayit.kodu = Val(Text1)
kayit.adi_soyadi = Text2
kayit.grubu = Text3
kayit.adresi = Text4
kayit.ilçe = Text5
kayit.il = Text6
kayit.telefon = Text7
kayit.fax = Text8
Put #1, kayit.kodu, kayit
Close #1
MsgBox ("Kayıt Tamamlandı")
Command3_Click
End Sub
Private Sub Command2_Click()
Open "C:\MUSTERI.DAT" For Random As #1 Len = Len(kayit)
KayitNo = Val(Text1)
Get #1, KayitNo, kayit
Text2 = kayit.adi_soyadi
Text3 = kayit.grubu
Text4 = kayit.adresi
Text5 = kayit.ilçe
Text6 = kayit.il
Text7 = kayit.telefon
Text8 = kayit.fax
Close #1
End Sub
Private Sub Command3_Click()
Text1 = "": Text2 = "": Text3 = "": Text4 = "": Text5 = "": Text6 = "": Text7 = "": Text8 = ""
End Sub
Private Sub Form_Load()
Text1 = "": Text2 = "": Text3 = "": Text4 = "": Text5 = "": Text6 = "": Text7 = "": Text8 = ""
End Sub