Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
End Sub
Private Sub txtgonghao_LostFocus()
Dim cnnjinbin As New ADODB.Connection
Dim rstjinbin As New ADODB.Recordset
If Len(Trim(txtgonghao.Text)) <> 0 Then
With cnnjinbin
If .State = adStateOpen Then
.Close
End If
.Provider = "microsoft.jet.oledb.4.0"
.ConnectionString = App.Path & "\jinbin.mdb"
.Open
End With
With rstjinbin
If .State = adStateOpen Then
.Close
End If
.LockType = adLockReadOnly
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.ActiveConnection = cnnjinbin
.Source = "select top 1 * from data where gonghao='" & Trim(txtgonghao.Text) & "'order by bh desc"
.Open
If .RecordCount <> 0 Then
Do Until .EOF
txtgonghao1.Text = Trim(.Fields!gonghao.Value)
txtsfname.Text = Trim(.Fields!sxm.Value)
txt5b.Text = Trim(.Fields!begin5.Value)
txt5e.Text = Trim(.Fields!end5.Value)
txt5b1temp.Text = Trim(.Fields!begintwo5.Value)
txt5e1temp.Text = Trim(.Fields!endtwo5.Value)
txt5b2temp.Text = Trim(.Fields!beginthree5.Value)
txt5e2temp.Text = Trim(.Fields!endthree5.Value)