Private Sub Form_Load()
Dim i As Integer
Dim myyear As Integer, mymonth As Integer
Dim myName As String
'myName获值
myName = Trim(主程序.search1.Text)
'连接数据库和表
Data1.DatabaseName = App.Path & "\information.mdb"
Data1.Recordset.FindFirst "姓名 = " & myName
If Data1.Recordset.NoMatch Then
MsgBox "没找到相关资料", vbOKOnly
End If
Me.title1.Caption = 主程序.search1.Text & "的资料"
End Sub多谢了~
Dim i As Integer
Dim myyear As Integer, mymonth As Integer
Dim myName As String
'myName获值
myName = Trim(主程序.search1.Text)
'连接数据库和表
Data1.DatabaseName = App.Path & "\information.mdb"
Data1.Recordset.FindFirst "姓名 = " & myName
If Data1.Recordset.NoMatch Then
MsgBox "没找到相关资料", vbOKOnly
End If
Me.title1.Caption = 主程序.search1.Text & "的资料"
End Sub多谢了~
Private Sub Form_Load()
Dim sql1 As String
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\information.mdb;Persist Security Info=False"
sql1 = "select * form 年份 "
Adodc1.RecordSource = sql1
Adodc1.Refresh
For i = 0 To Adodc1.Recordset.Fields.Count - 1
year1.AddItem Adodc1.Recordset.Fields(i).Name
Next i
year1.Text = year1.List(0)
End Sub
这个就引发了“对象refresh的方法Iadodc失败”