2

I am about to release an Access Database application where the UI is used exclusively to interact with the database tables.

Whilst I am interacting with the forms during run time, the Visual Basic Editor appears with a line of code highlighted in debug mode, even when no breakpoints exist and no run time error has occurred.

Has anyone else come across this issue?

I need to ensure that the editor does not appear (under normal operating conditions) while the user is interacting with the application.

Thanks.

rosst400
  • 563
  • 2
  • 7
  • 19
  • I've seen this before, and wish I could remember exactly what I've done to fix it. I am somewhat certain that it is a vba evironment setting. Try it out on another machine if you can – Pynner Jan 27 '12 at 05:21
  • 1
    I've had this before, try setting a breakpoint at this line of code, then immediately take it back off and save the file. – Matt Donnan Jan 27 '12 at 09:47

2 Answers2

1

Are your users working with an .accdb file? (or .mdb, depending on the Access version)

If yes, you should convert it into an .accde/.mde before giving it to your users.
Quote from the link:

Additionally, if the database design needs to be secured to prevent changes, Access databases can be locked/protected (and the source code compiled) by converting the database to a .MDE file. All changes to the VBA project (modules, forms, or reports) need to be made to the original MDB and then reconverted to MDE. In Access 2007 and Access 2010, the ACCDB database is converted to an ACCDE file. Some tools are available for unlocking and "decompiling", although certain elements including original VBA comments and formatting are normally irretrievable.

--> since .accde/.mde files are compiled, it's not possible to view the source code at all.
So the VBA editor can never appear accidentally like you experienced...be it because of a breakpoint, some Stops in the code or some strange breakpoint error like yours.

Christian Specht
  • 35,843
  • 15
  • 128
  • 182
1

Yes, I have had this problem too and it has driven me batty. The quick and dirty way of fixing it is to create blank database and import all of the objects from you old database into the new one.

ChrisPadgham
  • 860
  • 5
  • 4