473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VBA Not Working -- AT ALL

twinnyfo
3,653 Expert Mod 2GB
OK, experts, here is the weirdest thing I have ever experienced with MS Access so far... and I've seen some really weird stuff.

Here I am, working along and building a new database, got a few tables built, designed a report, crafted a few forms--getting the look and feel right first, before I start writing the code.

Then I draft some quick code to perform a very simple function--nothing fancy, just a quick little exercise in recordsets. So, I open the form, click my command button and.... nothing.

What? Maybe I don't have the command button or the procedure named properly. Nope, click on the event launcher and it takes right to where my code is!

Let me insert a break point at the name of the procedure. maybe the procedure is firing, but just not "doing" anything. This wouldn't be the first time that I've written faulty code.

Open the form and click the button.... Nothing! Doesn't even highlight the procedure! Nothing.

Hmmmmm, maybe there is something wrong with "this" DB, but it is brand new--only a couple hours of work. But, let me create a "newer" db and import all my objects.

Open the Form, click the button. NOTHING!!!???

So, I'm trying to figure this out. I check the setting of the DB's I use all the time. Everything is identical.

I click on my Access Options, and under Current Database, I have the "Use Access Special Keys" unchecked. I don't like to let people misuse the DB, so I disable this feature (just like on all my other DBs that currently work!). Hmmmmmmm, I check it, close the DB and open it again.

Open the Form, click the button, and BAM! Works like a charm. Open my Access Options again, uncheck the "Use Access Special Keys" box, close the DB and open it again.

Open the Form, click the button, and BAM! Works like a charm!!!

I freely admit that I don't know everything about Access, but this one is so far beyond absolutely BIZARRE that I had to share to see if anyone has any insights into this?

Yeah! There is a reason why Goofy is scratching his head on this one.....
Jul 25 '14 #1
11 5202
Seth Schrock
2,965 Expert 2GB
When code doesn't work for me, what I normally think of is that I haven't enabled content when the database first opens. If the database isn't in a trusted location, then it will (by default anyway) open the database with macros and code disabled. You would have to click Enable Content to it to work.
Jul 25 '14 #2
twinnyfo
3,653 Expert Mod 2GB
Yep - done that. That humongous yellow warning sign that I get is kind of hard to miss....

This one was the craziest thing I've ever seen.
Jul 25 '14 #3
NeoPa
32,556 Expert Mod 16PB
Which version Twinnyfo?

Seems like the fact of disabling Special Keys from the start gets it into some mode whereby the code doesn't work.

I'd be interested in a copy to play with if you can share. I can let you have my email address no problem if that helps.
Jul 26 '14 #4
twinnyfo
3,653 Expert Mod 2GB
NeoPa,

2010 is the version. I'm not real concerned at this point, as I was able to get it working. But, it is incredibly strange that it exhibited this behavior. Now, after I've got it working, I can't "undo" it--that is, I can't get it to repeat its poor behavior.

Not sure there really is an "answer" to this, other than MS Access likes to have a mind of its own....
Jul 28 '14 #5
zmbd
5,501 Expert Mod 4TB
What steps did you take to get things working?
I've seen this happen in only three cases...
- Virus
- Someone was looking at the references and disabled the VBA by "accident"
- Global security setting (GPOEditor: User Config, Admin Templates, Microsoft Excel 2010, Excel Options, Security, Trust Center,
VBA Macro Notification Settings )was set to disable all macros without warning. Convenced my IT departement to set this back to user control... showed them about the signed macros too; however, they thought it would be too much work (I agreed) to setup properly.
Jul 28 '14 #6
twinnyfo
3,653 Expert Mod 2GB
Z-

This was exactly as described: New DB, turn off "Use Access Special Keys", buld stuff, nothing works. Turn on "Use Access Special Keys", everything works. Turn it off again, no effect (as it should be).

Weird......
Jul 28 '14 #7
zmbd
5,501 Expert Mod 4TB
yes wierd... cannot recreate on my systems... .
not seeing it in the bug reports either...
the Gremlins love you, I'll send you mine too! (^_^)
Jul 28 '14 #8
Both
1
HI twinnyfo

Please tell me you found a solution. I have exactly the same problem. VBA not running from query , but same code runns perfectly inside a form
Jun 13 '17 #9
twinnyfo
3,653 Expert Mod 2GB
Both,

The "solution" was exactly as described.

You mention "VBA not running from query." Sounds like the makings for a new question to be answered on this forum....
Jun 13 '17 #10
NeoPa
32,556 Expert Mod 16PB
Hi 'Both'.

What he means is that if you think you have a similar problem then by all means post a new question. Do not hijack this thread for your problem as that is not acceptable, whereas new questions, potentially with a link to this one, are perfectly acceptable.

Welcome to Bytes.com :-)
Jun 13 '17 #11
Nauticalgent
100 64KB
The Access Gnomes...they are mischievous little varmits!
Jun 14 '17 #12

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

Similar topics

6
by: Mullin Yu | last post by:
hi, i have a web service that has file operations on Windows OS, and there may be a file concurrency issue if only one working directory e.g. c:\working therefore, i want to have a unique sub...
5
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We...
5
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find...
8
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs...
2
by: Don | last post by:
I'm having problems with intellisense, autocomplete, etc. suddenly not working in certain classes of a project I'm working on. All the options are set, and it all works fine for most classes, but...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
4
by: qbproger | last post by:
I'm developing a plugin for some software. The previous version of the software didn't require a start in directory to be set. This allowed me to leave the working directory to the default in the...
3
by: Jason Huang | last post by:
Hi, In our C# Windows Form application, we are using the SQL Server 2000 as the database server. The Database table MyTable has a field RegistrationDate which represents the Date a client comes...
0
by: WORKING IN FAITH | last post by:
three years I LOVE You Monica More options 1 message - Collapse all WORKING IN FAITH View profile More options Nov 13, 11:29 am three years I LOVE You Monica
3
by: lds | last post by:
On our server we have both applications that have been migrated to use v2.0 of the framework as well as apps that have not yet been migrated and still use 1.1. When I tried to deploy my v2.0 app...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.