Results 1 to 4 of 4
  1. #1
    Michael R is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Apr 2012
    Posts
    2

    How to pass event parameter to a function without using [Event Procedure]?

    Hello]



    Is it possible in Access?

    For instance, I want to use a generic function =FormKeyDown() on form's key down event, instead of using event procedure:

    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    , I want to be able to retrieve KeyCode in

    Code:
    Function FormKeyDown()
    .
    End Function
    Is it possible? Thanks very much in advance, Michael.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    The event property can be a call to a function. http://answers.microsoft.com/en-us/o...4-586fa7dd2517
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Michael R is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Apr 2012
    Posts
    2
    Quote Originally Posted by June7 View Post
    The event property can be a call to a function. http://answers.microsoft.com/en-us/o...4-586fa7dd2517
    But i asked about how the parameter (for instance: For OnKeyDown event: Keycode, For on MouseWheel event: Page, Count) can be a call to a function

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    You want to capture the keycode of pressed key or mouse scroll in a custom function instead of the event? Why? I don't think can do that. It is the act of pressing a key or scrolling mouse that captures the info.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. 'After update' Event procedure
    By sk88 in forum Access
    Replies: 5
    Last Post: 08-30-2011, 02:51 PM
  2. On-Click Event Procedure
    By tbassngal in forum Forms
    Replies: 6
    Last Post: 07-20-2011, 07:06 AM
  3. Replies: 2
    Last Post: 07-19-2011, 04:28 PM
  4. Pass image parameter to stored procedure
    By Kencao in forum Programming
    Replies: 3
    Last Post: 04-28-2010, 11:51 PM
  5. On Click Event Procedure
    By MrDean in forum Forms
    Replies: 3
    Last Post: 10-07-2009, 07:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums