Option Compare Database
Option Explicit
Public GuserID As Integer
Public Function insertLogo(ByVal strDescription As String)
On Error GoTo Err
If Forms!用户登录!用户名 = 0 Then
MsgBox "请登陆系统!", vbQuestion
Else
Dim conn As ADODB.Connection
Set conn = CurrentProject.Connection
Dim rst As New ADODB.Recordset
Dim strsql As String
strsql = "SELECT 计算机名, 操作员, 操作描述 FROM 操作日记"
rst.Open strsql, conn, adOpenKeyset, adLockOptimistic
rst.AddNew
rst("计算机名") = fOSMachineName()
rst("操作员") = Forms!用户登录!用户名
rst("操作描述") = strDescription
rst.Update
rst.Close
Set rst = Nothing
Set conn = Nothing
End If
Exit Function
Err:
MsgBox Err.Number & Err.Description
End Function
Public Sub refreshfrm(Optional iisel As Integer = 0)
If Len(Parent.txtuid & "") = 0 Then Exit Sub
'Me.Painting = False
'txtsub.SetFocus
Dim strmsg As String
strmsg = showmsg(Parent.txtuid, iisel) & ""
If Len(strmsg) = 0 Then Exit Sub
txtsub = strmsg & txtsub.Text
'txtsub.SelStart = Len(txtsub.Text)
'txtcontent.SetFocus
'Me.Painting = True
Parent.txtcontent.SetFocus
End Sub