ACCESS中比如在窗体中输入时间 点击查询按钮 在下面子窗体中显示对应结果,具体要怎么做,求源代码
展开全部
ck()
Adodc1.Recordset.MoveFirst
Timer1.Enabled = True
End Sub
Sub xianshi()
Text1.DataField = "学号"
Text2.DataField = "姓名"
Text3.DataField = "性别"
Text4.DataField = "数学"
Text5.DataField = "语文"
Text6.DataField = "英语"
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.AddNew ("学号")
With Adodc1
.Recordset("学号") = Text1
.Recordset("姓名") = Text2
.Recordset("性别") = Text3
.Recordset("数学") = Text4
.Recordset("语文") = Text5
.Recordset("英语") = Text6
.Recordset.Save
End With
End Sub
Private Sub Timer1_Timer()
If Adodc1.Recordset.EOF = False Then
If Text8.Text = Text7.Text Then
Call xianshi
Else
Adodc1.Recordset.MoveNext
Timer2.Enabled = True
End If
End If
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
If Adodc1.Recordset.EOF = False Then
If Text8.Text = Text7.Text Then
Call xianshi
Else
Adodc1.Recordset.MoveNext
Timer1.Enabled = True
End If
End If
Timer2.Enabled = False
End Sub
这段程序 完全可以满足你的要求 不过你要 建数据库 嫌麻烦的话 把邮箱给我 我把程序发给你!!
Adodc1.Recordset.MoveFirst
Timer1.Enabled = True
End Sub
Sub xianshi()
Text1.DataField = "学号"
Text2.DataField = "姓名"
Text3.DataField = "性别"
Text4.DataField = "数学"
Text5.DataField = "语文"
Text6.DataField = "英语"
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.AddNew ("学号")
With Adodc1
.Recordset("学号") = Text1
.Recordset("姓名") = Text2
.Recordset("性别") = Text3
.Recordset("数学") = Text4
.Recordset("语文") = Text5
.Recordset("英语") = Text6
.Recordset.Save
End With
End Sub
Private Sub Timer1_Timer()
If Adodc1.Recordset.EOF = False Then
If Text8.Text = Text7.Text Then
Call xianshi
Else
Adodc1.Recordset.MoveNext
Timer2.Enabled = True
End If
End If
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
If Adodc1.Recordset.EOF = False Then
If Text8.Text = Text7.Text Then
Call xianshi
Else
Adodc1.Recordset.MoveNext
Timer1.Enabled = True
End If
End If
Timer2.Enabled = False
End Sub
这段程序 完全可以满足你的要求 不过你要 建数据库 嫌麻烦的话 把邮箱给我 我把程序发给你!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询