Option Explicit
Private jlh As Integer
Private Type xsglxtbl
bh As String
xm As String
nl As String
End Type
Dim xsglxt As xsglxtbl
Private Sub Command1_Click()
xsglxt.bh = Text1.Text
xsglxt.xm = Text2.Text
xsglxt.nl = Combo1.Text
Open "C:\Documents and Settings\Apple\桌面\vb.txt" For Random As #1
jlh = LOF(1) / Len(xsglxt) + 1
Put #1, jlh, xsglxt
Close #1
End Sub
Private Sub Command2_Click()
xsglxt.bh = Text1.Text
xsglxt.xm = Text2.Text
xsglxt.nl = Combo1.Text
Open "C:\Documents and Settings\Apple\桌面\vb.txt" For Random As #1
Put #1, jlh, xsglxt
Close #1
End Sub
Private Sub Command3_Click()
jlh = Val(Text3)
If jlh = 1 Then
Command5.Enabled = False
Else
Command5.Enabled = True
End If
Open "C:\Documents and Settings\Apple\桌面\vb.txt" For Random As #1
Get #1, jlh, xsglxt
Close #1
Text1.Text = xsglxt.bh
Text2.Text = xsglxt.xm
Combo1.Text = xsglxt.nl
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Label1.ForeColor = QBColor(Int(Rnd * 14 + 0))
End Sub
为什么我在查询的时候,记录号3以后的数据都查补出来?