Results 1 to 11 of 11
  1. #1
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12

    Can not go to new record using buttons on form

    I have a Access program that I have used for 10 years with out problems. The program is used to track work done for various customers. When I try to go to a new record for the customer using the New Record Button on my form, the program stopped and I got a Microsoft error saying it had encountered an error and needs to close. No error Number shown. I can use the Last Record button with out problems, but when I hit Next Record i.e. new record, again I get kicked out. I have tried to trap the Error Number with no luck. I have purged a lot of early records thinking possible the data base was to large - no luck. I have deleted the data for the last two customer jobs - no luck. I am at a lost for what I need to do to be able to use the data entry form. Any suggestions of where to start looking for the problem



    Thank You Jim H

  2. #2
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    It could be possible that the button is corrupted. It's happened a few times to me. Open up the form in design mode and check the properties of the button. Is the "On-Click" event an Event Procedure or Embedded Macro?

  3. #3
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    The "On-Click" is an Event Procedure. I have looked at the VBA code several times and can not find any problems. Following is the code.
    Private Sub NewJob_cmd_Click()
    On Error GoTo Err_NewJob_cmd_Click

    DoCmd.GoToRecord , , acNewRec

    Forms![Customers]![job Data Subform3].Form.[Route].SetFocus 'added 1/22/03

    Exit_NewJob_cmd_Click:
    Exit Sub

    Err_NewJob_cmd_Click:
    MsgBox Err.Description
    Resume Exit_NewJob_cmd_Click
    End Sub

    Thanks for your reply
    Jim H

  4. #4
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    The only other things I can think of would be to 1) create a new button and copy the code into its OnClick event and see if that fixes the issue or 2) try recreating some of the code in a macro and have a button that runs the macro. This has happened to me, and I ended up having to create a macro with the exact same code as my VBA for some odd reason.

  5. #5
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    Will try your suggestions and let you know what happens.

    Thanks
    Jim H

  6. #6
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    Have tried creating a new button with new Event Procedure and had the same problem - Microsoft error failure. Have not been able to get a macro to run properly. I have buttons that take me to the Last Record, Previous Record, and Next Record. I get the same Microsoft error when I hit Last Record and then hit Next Record button.
    I have a copy of the program from the previous week of data entry and it works just fine -so far(:.
    Jim H

  7. #7
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    Hmmm. My very last solution would be a compact & repair. And then if not that, make sure all the data in your tables is current, and then save that file as a new one. Other than that I'm out of ideas.

  8. #8
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    Also, be sure to create a backup of your original for good measure.

  9. #9
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    I've done compact and repair several times when the problem first happened. I have made back-ups. Will try your suggestion for the table. I wonder if anyone else has read or following this thread and if they would step in to help. Or maybe I posted this problem in the wrong forum.

    Any way I Thank You very much for taking your time to work with me.
    Jim H

  10. #10
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    I have "analyzed" the three tables in Excel and did not find any problems there. Have not tried making a new table as you suggested yet. Have to go do data entry - the hard way via tables only. Do you have any thoughts as to here I should re-post this problem?

    Jim H

  11. #11
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43
    You could try posting in the "Forms" section of these forums. That might get your issue some more specific attention.

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

Similar Threads

  1. Navigation Record Buttons in Forms
    By jaarons in forum Forms
    Replies: 4
    Last Post: 01-02-2013, 09:57 PM
  2. Replies: 4
    Last Post: 05-08-2012, 08:07 AM
  3. Replies: 1
    Last Post: 06-01-2011, 06:44 PM
  4. Record navigation buttons work backward
    By jonesy29847 in forum Access
    Replies: 22
    Last Post: 04-11-2011, 06:17 AM
  5. Replies: 1
    Last Post: 03-09-2009, 12:46 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