本文介绍了我有一个问题是在ACCESS中开发一个我需要帮助的工具。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我希望我在正确的区域发布此信息以获得一些帮助。


我正在努力我在使用Microsoft ACCESS 2010工作时使用的访问工具,并遇到了一个问题。如果有人可以帮助我解决我遇到的问题,我会非常感激,我这是一个完整的NOVICE,在这种情况下,我不知道我在这方面做错了什么。


我遇到的问题是关于我创建的应用程序的退出功能。当我选择"退出"时我在表达式中收到"语法错误(缺少运算符)"的错误消息。其他一切似乎都能正常工作,直到我达到
这一点,有人可以帮助我并告诉我需要做些什么来纠正这个问题。下面是我正在尝试的功能的代码。


Private Sub cmdLogOut_Click


On Error GoTo Err_cmdLogOut_Click


Dim intResponse As Integer


Dim db A DAO.Database


Dim rst DAO.Recordset



设置db = CurrentDb()


设置rst = db.OpenRecordset(" ztbluserlog",dbOpenDynaset)


Forms!fmnuMainMenu.visible = False


intResponse = MsgBox("你确定要退出吗?",vbYesNo + vbExckenation,"退出系统" ;)


选择案例intResponse


案例vbYes


rst.FindLast" SecurityID  ="  &安培; User.Security.ID


rst.Edit


rst!TimeOut = Now()


rst。更新


DoCmd.Quit


Case Else


表格!fmnuMainMenu.Visible = True


结束选择



Exit_cmdLogOut_Click:


退出子



Err_cmdLogOut_Click:


MsgBox Err.Description


恢复Exit_cmdLogOut_Click



End Sub



任何帮助将不胜感激。

解决方案

Hello,

I hope I am posting this in the correct area to receive some assistance.

I am working on an Access tool for my use at work using Microsoft ACCESS 2010 and have come across an issue. If anyone can assist me with the problem I am having I would greatly appreciate it, I am a complete NOVICE at doing this and I don't know what I am doing wrong in this case.

The issue I am having is regarding the exit function from the application I have created. When I select "Exit" I get an error message of, "Syntax error (missing operator) in expression. Everything else seems to work correctly until I get to this point, could someone assist me and tell me what I need to do to correct the issue. Below is the code for the function I am trying to do.

Private Sub cmdLogOut_Click

On Error GoTo Err_cmdLogOut_Click

Dim intResponse As Integer

Dim db A DAO.Database

Dim rst A DAO.Recordset

Set db=CurrentDb()

Set rst=db.OpenRecordset ("ztbluserlog", dbOpenDynaset)

Forms !fmnuMainMenu.visible = False

intResponse = MsgBox ("Are you sure you wish to log out?", vbYesNo + vbExckenation, "Exiting System")

Select Case intResponse

Case vbYes

rst.FindLast "SecurityID = " & User.Security.ID

rst.Edit

rst!TimeOut = Now()

rst.Update

DoCmd.Quit

Case Else

Forms!fmnuMainMenu.Visible = True

End Select

Exit_cmdLogOut_Click:

Exit Sub

Err_cmdLogOut_Click:

MsgBox Err.Description

Resume Exit_cmdLogOut_Click

End Sub

Any assistance will be greatly appreciated.



解决方案


这篇关于我有一个问题是在ACCESS中开发一个我需要帮助的工具。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 13:48