Results 1 to 9 of 9
  1. #1
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101

    Form - All controls on form stop working and return error

    I have this problem on a form where all controls stop working and return an error.


    It could be any event, On-Current, After Update, On-Click. To get things working again all I have to do is go into desgin mode and open up the VBA code window. I do not need to make any changes to code just open and then close it again and all the controls start working again. This happens every time I close and open the database. I did a compact and repair on the database but it does not correct the issue. I even rebooted my pc and still it keeps happening.
    Does anyone know why this happens and how I can correct the database so it won't happen again?
    If a copy of my database is needed to answer the question please let me know so I can prepare a copy of the databse with just sample data.
    Thanks in advance for your responses.

    9:15 - I had stated that I did not have to go into VBA to clear the problem, that is no longer true.

    Click image for larger version. 

Name:	DB_Error3.JPG 
Views:	16 
Size:	33.2 KB 
ID:	19224

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Are you compiling your VBA code after you update it? It could be a compile error somewhere. In the VBA code window, select debug - compile.

  3. #3
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    That's the thing I don't need to edit any code just open the VBA window and close it, go back to form view and everything is working. I did a complie and it did not detect any errors. Here is the thing there were no changes made to the as far as BA code is concerned. Just some table, form and querey changes. Basiclly I added a couple of fields to my database. But it was working fine after the changes. I came back from vacation opened it and this started happeing.
    Another thing when I first created this database a year ago I did start it out as a FE/BE type since I thought other people needed access. I named the front end with FE at the begging of the file name. When I discovered I was the only one to maintain this data I scratched the FE/BE deal and renamed the file removing the FE. When I am in the VBA window it has the original name of the file at the top. But that's the way it has been all along and I never had any problems except when I fat fingered code and had to correct. But nothing like this before. Don't know it that makes any difference but just thought I mention it. I also have an audit trail built but that is working fine.

    Click image for larger version. 

Name:	DB_Error5.JPG 
Views:	16 
Size:	39.1 KB 
ID:	19225

  4. #4
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Not sure if this will fix your problem.

    If your database is still FE/BE, did you re-link your table after you change/add fields on the tables.

  5. #5
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    No it no longer is a FE/BE, before I finished designing and building the database early last year it wwas determined I was the only person to access and maintain database. So when I starting using it it was a standard database. I maintain a list of contractors that used to be maintained on an Excel spreadsheet. When I took over I moved it to Access and then export the data once a month to excel and send it out.

  6. #6
    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
    Has the code ever run without opening in Design View and then running it in Form View? If 'no,' I suspect that the Folder the file resides in needs to be declared as 'Trusted.'

    To "Trust" your folder, click:

    • Office Button (top left)
    • Access Options (bottom of dialog)
    • Trust Center (left)
    • Trust Center Settings (button)
    • Trusted Locations (left)
    • Add new location (button)

    Access will run code, when going from Design View to running it, in Form View, even with the Folder not 'trusted,' but will balk when opened directly in Form View, under the same conditions.

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

    All posts/responses based on Access 2003/2007

  7. #7
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    Sorry for such a delay is responding as last week was a really busy week. Yes my database resides in a trusted folder. As of lFriday the problem seems to have cleared itself, don't know why or how but all controls work on open. I can't explain the reason or a fix but just that it started working again. So I will close this thread with no clear solution as to a fix.

  8. #8
    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
    Quote Originally Posted by vad77 View Post

    ...As of Friday the problem seems to have cleared itself...
    Don't you hate when that happens! I'd be especially careful, given what's already happened, to make frequent backups!

    Glad you're up and running, again!

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

    All posts/responses based on Access 2003/2007

  9. #9
    vad77 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Location
    USA
    Posts
    101
    I have a program called FBackup5 which automaticlly backups all my databases twice a day. I also back it up manually just before I am going to make major changes.

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

Similar Threads

  1. Puzzled - Form controls stop working
    By vad77 in forum Access
    Replies: 6
    Last Post: 03-31-2014, 10:21 AM
  2. Error When Clearing Controls on a Form
    By dccjr in forum Programming
    Replies: 4
    Last Post: 09-20-2013, 11:10 AM
  3. Replies: 3
    Last Post: 11-15-2012, 06:59 PM
  4. Replies: 2
    Last Post: 11-29-2009, 12:00 PM
  5. Replies: 1
    Last Post: 09-28-2009, 05:21 PM

Tags for this Thread

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