Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoKeys Revisited (Access 2003)

    The Good News is that I have all but one of my AutoKeys/Module codings working correctly. The one that is giving me the problem is:

    In Module:
    Public Function butDeleteCurrentRecord()
    On Error GoTo Err_butDeleteCurrentRecord_Click
    Dim intResponse As Integer
    Dim DoYouMeanIt
    DoYouMeanIt = MsgBox("Are You Absolutely Sure You Want to Delete This Record?", vbYesNo, "This Record Will No Longer Exist!!")
    If DoYouMeanIt = vbYes Then
    CodeContextObject.[Archived] = -1
    CodeContextObject.Requery
    Else
    intResponse = acDataErrContinue
    End If
    Exit_butDeleteCurrentRecord_Click:
    Exit Function
    Err_butDeleteCurrentRecord_Click:
    MsgBox Err.Description
    Resume Exit_butDeleteCurrentRecord_Click
    End Function


    In AutoKeys:

    {F3} RunCode butDeleteCurrentRecord ()

    When the F3 Function Key is pressed anywhere in the System I get:
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AutoKeys Revisited (Access 2003)

    CodeContextObject will not work here, as I explained before, since you are not calling the code directly from a form.

    Try <code>Screen.ActiveForm</code> instead of <code>ScreenActiveForm</code>

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoKeys Revisited (Access 2003)

    Hans,

    Now you know how my mother felt, "How many times do I have to tell you .. . . . . . "

    or

    Do you know what happens when a period is missed...

    or, and really,

    my apologies for not paying attention,
    Cheers,
    Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AutoKeys Revisited (Access 2003)

    > Do you know what happens when a period is missed...

    <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: AutoKeys Revisited (Access 2003)

    Now now Hans, this is a family forum. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  6. #6
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoKeys Revisited (Access 2003)

    <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>
    Mom goes to the doctor?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoKeys Revisited (Access 2003)

    The Devil is making me ask this question . . . .

    And families come from where? <img src=/S/angel.gif border=0 alt=angel width=15 height=21>
    Cheers,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •