Results 1 to 9 of 9
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 7 Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672

    What does this code mean

    I am getting very good at deciphering VBA code!!! I have one question that google isn't much help with in the code it shows:



    Code:
    DoEvents
    Me.Form.Refresh
    Exit_Form_Current:
    Exit Sub
    Err_Form_Current:
    Select Case Err.Number
    Case 0
    Resume Next
    Case Else
    Call gsErrorHandler(Err, Application.CurrentObjectName, Application.CurrentObjectType, "Form_Current")
    End Select
    Resume Exit_Form_Current
    End Sub
    And when I Debug, it is showing Sub or Function not defined on the Call gsErrorHandler. Is this a macro or something that was written by the previous code writer or what in the world is that?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    it must be a user defined function or procedure.

  3. #3
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 7 Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    When I have the database open, how would I get to it to view the code? Does that make sense what I am asking?

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    you need to find out when this code is called.

    you can find by the name of the procedure.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,740
    You could go to any module and do a Find, also click Current Project, and type in the string you'd like to find.
    Access will search all modules for the string.

    gsErrorHandler sounds lke the name of a routine written and stored elsewhere.

  6. #6
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 7 Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    So if I open access and hit alt+F11 and all I have to do is search for the gsErrorHandle

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,740
    Quote Originally Posted by jo15765 View Post
    So if I open access and hit alt+F11 and all I have to do is search for the gsErrorHandle
    Yes, but Select Current Project before you hit FIND
    and it's gsErrorHandler right.

  8. #8
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 7 Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    Yes, it is gsErrorHandler. Was just a typo.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,740
    Did you find the code?

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

Similar Threads

  1. Code to add Yes and N/A's
    By Brian62 in forum Queries
    Replies: 1
    Last Post: 11-30-2010, 05:16 PM
  2. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  3. Code in combobox, code in text box
    By float in forum Forms
    Replies: 3
    Last Post: 09-29-2010, 07:12 AM
  4. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM
  5. Help with vba code
    By rockape in forum Programming
    Replies: 11
    Last Post: 09-29-2009, 06:49 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