By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Access VBA lacking errors

P: 2
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?
Jun 13 '07 #1
Share this Question
Share on Google+
2 Replies


JConsulting
Expert 100+
P: 603
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
Jun 13 '07 #2

P: 2
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?
Jun 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.