Access VBA lacking errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cyntalan
    New Member
    • Jun 2007
    • 2

    #1

    Access VBA lacking errors

    You know, I have this bad feeling I'm wasting space by asking this, but I'm having a peculiar problem. Most of my VBA experience has been Excel, and giving Access for a go for the first time has proven to be a much different experience.

    It started when I was attempting to create a simple temporary query. Every time I tried, rather than getting an error, the code would just stop execution. I thought there was just an issue with CreateQueryDef, but then I tried something silly. I started off an if statement, getting "If a = 1 Then", and not finishing the statement. Again, rather than throwing me a compile error, the code just quits. I've looked all over for some bizarre setting in Access or VBA that would quit code before throwing an error, but I can't find anything for the life of me. Would someone humor me and point this out to me? Or am I not nuts and this is truly bizarre?
  • JConsulting
    Recognized Expert Contributor
    • Apr 2007
    • 603

    #2
    Originally posted by Cyntalan
    You know, I have this bad feeling I'm wasting space by asking this, but I'm having a peculiar problem. Most of my VBA experience has been Excel, and giving Access for a go for the first time has proven to be a much different experience.

    It started when I was attempting to create a simple temporary query. Every time I tried, rather than getting an error, the code would just stop execution. I thought there was just an issue with CreateQueryDef, but then I tried something silly. I started off an if statement, getting "If a = 1 Then", and not finishing the statement. Again, rather than throwing me a compile error, the code just quits. I've looked all over for some bizarre setting in Access or VBA that would quit code before throwing an error, but I can't find anything for the life of me. Would someone humor me and point this out to me? Or am I not nuts and this is truly bizarre?
    open your VBA window and go to tools/options

    on the General tab...select Break on ??? errors. whatever setting you wish.

    Break on all errors is annoying, but if you don't have any error handling code then start there.
    J

    Comment

    • Cyntalan
      New Member
      • Jun 2007
      • 2

      #3
      I have it set to All, actually. ^^;

      I will say this much, though. Our IT dept here has this strange method of security which has stupidly locked us out of things we shouldn't be locked out of, such as changing program settings. In one instance, the Adobe PDF Maker add-in for Excel was locked out of itself from generating/accessing the necessary registry entries to make a PDF out of a spreadsheet. ^^;

      However, most of those settings are usually noticeable when they're locked, as when I go back into the settings, locked out settings will have gone back to what they were before I changed them. This doesn't seem to be the case. Wouldn't rule out something else stupidly locked, though.

      Edit:

      After further investigation, I've noticed that this only seems to be the case with a single database I'm working with. I created a new database and attempted a bad piece of code and got my compile error. Is there any possible in-database lockouts possibly in play?

      Comment

      Working...