谢谢你的回答!试过了,点菜单里的 运行->全编译执行 同样的带有m_checkado 都是编辑错误,未找到方法或成员
Me.
m_checkado.RecordSource = "select * from 系统日志"
Me.m_checkado.Refresh
If Me.
m_checkado.Recordset.RecordCount > 0 Then
Me.
m_checkado.Recordset.MoveLast
End If
Me.
m_checkado.Recordset.AddNew
Me.
m_checkado.Recordset.Fields("用户名").Value = UserName
Me.
m_checkado.Recordset.Fields("操作时间").Value = Date + Time
Me.m_checkado.Recordset.Fields("操作内容").Value = inf
Me.m_checkado.Recordset.update
Me.m_checkado.Refresh
End Function
Public Sub 更新自定义查询菜单()
On Error GoTo quit
fMainForm
.m_checkado.RecordSource = "select * from 自定义查询"
fMainForm.m_checkado.Refresh
Dim count As Integer
count = fMainForm.m_checkado.Recordset.RecordCount
If count >= 1 Then
M自定义一.Visible = True
M自定义一.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义一.Visible = False
End If
If count >= 2 Then
M自定义二.Visible = True
M自定义二.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义二.Visible = False
End If
If count >= 3 Then
M自定义三.Visible = True
M自定义三.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义三.Visible = False
End If
If count >= 4 Then
M自定义四.Visible = True
M自定义四.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义四.Visible = False
End If
If count >= 5 Then
M自定义五.Visible = True
M自定义五.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义五.Visible = False
End If
If count >= 6 Then
M自定义六.Visible = True
M自定义六.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义六.Visible = False
End If
If count >= 7 Then
M自定义七.Visible = True
M自定义七.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义七.Visible = False
End If
If count >= 8 Then
M自定义八.Visible = True
M自定义八.caption = fMainForm.m_checkado.Recordset.Fields("查询名称").Value
If fMainForm.m_checkado.Recordset.EOF = False Then fMainForm.m_checkado.Recordset.MoveNext
Else
M自定义八.Visible = False
End If