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

    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.



    Worked with kacaccess on this problem in another form and was not able to solve the problem. We have tried "Compact and Repair", deleted old New Record button & code then created new button and code, and "analyzed" the files in Excel. There are 4 tables - Customer, Job Data, MaintJob and MaintLabor.

    Thank You Jim H





  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Can you post a copy of the db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    pradeep.sands is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    49
    Hi Jim,
    I had faced this problem few times.. Well, till now I couldn't solve what might be the actual problem..I guess, it might be that the database or links are corrupted somewhere as the microsoft says..
    Well, what I did was, I just opened another blank database in Access, and copied everything from this database into the new one manually...It worked then...
    Good luck...

  4. #4
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    pradeep,
    This is something like kacassess mentioned in copying tables into new tables.
    Thanks
    Jim H

  5. #5
    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

    Bob,
    I think that I've done this correctly - Finally.
    Jim H


    Zergott Time Study-reduced.zip

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Which form - Customers? Which button - New Customer? Works for me in Access 2007.
    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.

  7. #7
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    June7,
    The "New Job" Button causes the error for me. Another way I got the problem was when I hit "Last Job" and then hit "Next Job". This is the same as hitting "New Job". I'm using Access 2003 which is the only version Zergott's has. There should be a Toolbar button in the upper right corner "Find Cus..". When I tried the db in 2007, I found that this button was not there.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Got error today, db crashed when I pressed New Job. It bombs on the GoToRecord line.

    I tried setting focus to control first, fails.

    I tried DoCmd.RunCommand acCmdRecordsGoToNew, fails.

    I've never had to design a subform with GoToNew feature so I just did a test with my db and it works. However, did not have subsubform.

    I did a test in your db where I deleted the subsubform. Then the NewJob and NextJob buttons do not error.

    I created an unbound subform container on the subform. Still no error.

    That's as far as I am going. Suggest you rebuild the subsubform and subsubsubform a little bit at a time.
    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.

  9. #9
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    June7,

    I think I understand what you are saying. Delete the form where the Date, Clock times, etc. are entered and the form where the EmpNo, Time, etc. are entered. If I understand correctly this is what you are calling subsubform and subsubsubform. Would there be a better way to do what I'm trying to do to get all the data in the four tables?

    Another problem I've run into at times lately is that I have problems entering data directly into a table. Would you know why that could happen?

    My problem is that I don't understand why this db worked for over 10 years without any problem. It just doesn't make any sense to me. As for rebuilding as you suggested, I'm not sure that I remember how to do it - it's Hell getting Old. I would not be surprised if I'm back asking other questions as I try to rebuild.

    Thank You for the help. Jim H

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I don't know why the db quit working. Something must have changed. I don't know why the additional subform levels are causing issue. I did not do further testing in my db to try and replicate. I just identified that they are interfering in yours.

    If relationships are set to enforce integrity then could not enter record in child table without first having parent record. So could not create a child record and reference a parent ID that doesn't yet exist. If enforce integrity were not set you could enter whatever you wanted in child record, even parent ID that doesn't exist. This results in 'orphans'.
    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.

  11. #11
    Jim H is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    12
    June7
    Thank You very much. I had to make a new 3rd level subform and the db is working properly. I was able to use the 4th level subform over with out any problems. Now all I have to do is get all the vba back in to check for proper time entries. Thanks again.
    Jim H

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

Similar Threads

  1. Replies: 10
    Last Post: 08-15-2013, 07:01 AM
  2. Navigation Record Buttons in Forms
    By jaarons in forum Forms
    Replies: 4
    Last Post: 01-02-2013, 09:57 PM
  3. Replies: 4
    Last Post: 05-08-2012, 08:07 AM
  4. Replies: 1
    Last Post: 06-01-2011, 06:44 PM
  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