none
I have an issue will developing a tool in ACCESS that I need help with. RRS feed

  • Question

  • 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.

    
    • Edited by pfales Monday, December 15, 2014 3:55 PM
    Monday, December 15, 2014 3:15 PM

All replies