Results 1 to 4 of 4
  1. #1
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49

    Error while tabbing out - Column has Lost Focus Event property

    Hi,


    I am working in MS Access 2010 and my OS is Windows 7. I am facing a weired issue in MS Access. In my Data Sheet view, I am tabbing from one column to another and I have written "Lost Focus" event for one of the column. When I tab out from the column (Lost Focus event column) I am getting error like...
    The expression On Enter you entered as the event property setting produced the following error: Return without GoSub.
    * expression may not result in the name of macro, the name of a user-defined function, or [Event Procedure]
    * There may have been an error evaluating the function, event or macro.
    And this error is happening to few users and it is working for me. I am not sure what is the issue behind this

    Regards,
    Selvakumar R

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Sounds like one of the controls does not have a lost focus event handler but an Enter event handler. Check the names of the event handler by looking in the VBA module or the property sheet's Event Tab.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You might want to simply eyeball the Form's Code Module; I've seen the error message

    Return without GoSub

    before when the developer had copied a procedure from one Form and pasted it into another Form, accidentally doing so in the middle of an existing procedure, something like this:

    Code:
    Private Sub AddClient_Click()
    
    On Error GoTo Err_AddClient_Click
        
        DoCmd.GoToRecord , , acNewRec
    
    Private Sub CancelNewRecord_Click()
    
    On Error GoTo Err_CancelNewRecord_Click
    
     Me.Undo
     
    Exit_CancelNewRecord_Click:
        Exit Sub
    
    Err_CancelNewRecord_Click:
        MsgBox Err.Description
        Resume Exit_CancelNewRecord_Click
    
    End Sub
    
    Exit_AddClient_Click:
        Exit Sub
    
    Err_AddClient_Click:
        MsgBox Err.Description
        Resume Exit_AddClient_Click
        
    End Sub

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    There you go. That rings a bell. Compile your code. Should error with ambiguous such and such if you have what Linq is describing.

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

Similar Threads

  1. How do you use an event property for a form?
    By Access_Novice in forum Programming
    Replies: 6
    Last Post: 12-31-2013, 02:46 AM
  2. hide a list box on lost focus
    By markjkubicki in forum Programming
    Replies: 2
    Last Post: 08-18-2012, 10:32 AM
  3. Update Database on Lose Focus event
    By sgroth in forum Forms
    Replies: 2
    Last Post: 06-11-2011, 07:31 PM
  4. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  5. User focus control in AfterUpdate event
    By nosliwmada@gmailcom in forum Programming
    Replies: 3
    Last Post: 12-20-2010, 12:51 PM

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