473,387 Members | 1,890 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,387 software developers and data experts.

Macro invoked by mystery object.

122 100+
I have a form (Single Form view - bound to tblVisit) that when opened, give me the error message "Microsoft Access can't find macro 'providerMenu'."

Problem is, there are no Event handlers set on the form (according to the Properties dialog box), although there may have been at one time that have since been deleted. I've also looked at every control on the form and there are no Event handlers set anywhere. Is there any way to find out what is invoking this macro or is this a job for Rod Serling? It's a Twilight Zone joke for those of you who are too young (ouch) to remember.

I'm using Access 2003.
Jun 21 '08 #1
12 1280
nico5038
3,080 Expert 2GB
Can be a sign of corruption, create a new empty database and use "File/Get external data/Import" to get a "fresh" copy of all your objects.

Nic;o)
Jun 21 '08 #2
Annalyzer
122 100+
My first reaction to your answer was "Oh, goody" with a fair amount of sarcasm thrown in, but if it will fix the problem I'll give it a shot. This is a fairly large database, so I guess I know what I'll be doing this weekend.

Thanks nico5038, I really appreciate your help.

Today's mantra: make-backups-more-often make-backups-more-often make-backups-more-often...
Jun 21 '08 #3
nico5038
3,080 Expert 2GB
It's not really much work, as the "File/Get external data/Import" shows a pop-up form allowing you to select all objects per type (Table/Query/etc.).

It's in general my first action when a database acts strange. A "decompile" is "heavier", but will fix even more. (http://www.granite.ab.ca/access/decompile.htm.

Success !

Nic;o)
Jun 21 '08 #4
Annalyzer
122 100+
Thanks! You're right, it doesn't look like it's going to be too bad. I can't get to the article you linked right now - getting a 404 error - probably a DNS issue, but I've been stuck on this macro problem for so long and I'm so happy to have a postive direction to take that I'm not inclined to stop and muck with networking issues right now.

I'll take a look at it later (or sooner if, for some reason, this solution doesn't work). Have a great day! or night! or whatever time zone you're in. lol
Jun 21 '08 #5
Annalyzer
122 100+
Well, I imported everything into a new database and it seems I apparently imported the problem as well. Still getting the same error message. Looks like I'll be messing with dns today, but I'm giving it some time first in case it's my ISP and not me.

Thanks for your help and I'll let you know if I figure it out.
Jun 21 '08 #6
nico5038
3,080 Expert 2GB
Looks like the site is down, but google has the page in it's cache:
http://64.233.183.104/search?q=cache...nt=startpagina

I'm in the Dutch GMT+1 time zone, so it's evening :-)

Nic;o)
Jun 21 '08 #7
Annalyzer
122 100+
Mystery solved! I found the option in help for displaying object dependencies, so I displayed the dependencies for frmVisit (the form with the problem). It showed me that it was dependent on tblProvider. Object dependencies for tblProvider showed that it was missing an object named "School" or "School and Income." Well, I knew I did't have an object by that name, but that I did have a field in tblProvider that had those two items as lookup values. Sure enough, the Row Source Type for that lookup had gotten changed to "Table/Query" instead of "Value List." I changed it back to "Value List" and the problem was solved.

I don't know how that Row Source Type got changed....sometimes I think my mouse just clicks on things randomly when I'm not looking. ;-)
Jun 21 '08 #8
missinglinq
3,532 Expert 2GB
And where did providerMenu fit into all of this?

For future reference, when Access says that it can't find a Macro named Whatever, Whatever isn't necessarily a Macro!

Usually, when Access encounters the name of an object and can't locate that object, it pops an error message such as you got, naming the missing object and correctly identifying the type of object. Access does this by using context. In the line

DoCmd.OpenForm "Whatever"

for instance, if Whatever can't be found Access will say "Access can't find the Form Whatever." Access correctly identifies Whatever as a form, in this case, because of where it appears in the code.

But if Access runs into a line of code with a name standing all alone

Whatever

(which can happen, for instance, if the developer goes to delete some code and accidentally leaves the name behind) it has no context to correctly identify the type of object that is missing. And when this happens, Access always assumes (for some obscur reason that only Billy Bob Gates understands) that the missing object is a Macro! It would make too much sense, I guess, to simply say "Access can't find the Object Whatever."

Glad you finally got it figured out!

Welcome to Bytes!

Linq ;0)>
Jun 22 '08 #9
Annalyzer
122 100+
Thanks, linq! I can't remember what providerMenu was, but I'd be surprised if it was an object. I try to always name my objects beginning with the type of object - tblProvider, qryProviderRegistration, mcrRunWhatever, etc.

It may very well have been a variable somewhere in my code, however. I recently deleted a LOT of code after figuring out how to pass enough parameters to do the job with one public function instead in a module instead of a whole bunch of private functions in individual objects.

I went back to a prior version of the database to look for providerMenu, but after about 10 minutes found that my curiosity wasn't all that strong after all. I'm so excited to be back on track, I'm moving forward now. And you know what they say about objects (or developers) in motion....
Jun 22 '08 #10
NeoPa
32,556 Expert Mod 16PB
It sounds like your solution was better than mine anyway, but as a general point, I will just say that the Documenter (Tools / Analyse / Documenter in Access 2000 - a single "N" in this case ;)) can often help find confusing links.

It gives options to include a great deal of the layout of a database in the results, which can be saved as an RTF file. This file can be opened in Word and searched thoroughly.

It's a bit cumbersome, but can answer a lot of questions when used properly.

PS. I just check a PC we have with Access 2003 on and it works the same on there too :)
Jun 25 '08 #11
Annalyzer
122 100+
Thanks, NeoPa. I used Documentor when I took Access in college a couple of years ago (our instructor had us turn in assignments that way as well as electronically), but I hadn't thought to use it for "real" purposes. I'll try that next time. =)
Jun 25 '08 #12
NeoPa
32,556 Expert Mod 16PB
; - )
Jun 26 '08 #13

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

Similar topics

25
by: Andrew Dalke | last post by:
Here's a proposed Q&A for the FAQ based on a couple recent threads. Appropriate comments appreciated X.Y: Why doesn't Python have macros like in Lisp or Scheme? Before answering that, a...
27
by: TheDD | last post by:
Hello all, right now, i'm using the following macro to automatically add informations to exceptions: #define THROW(Class, args...) throw Class(__FILE__, __LINE__, ## args) but AFAIK, it's...
8
by: MLH | last post by:
My autoexec macro in an Access 2.0 database has 2 lines. The first runs DoMenuItem - Database - Window - Hide. The second lines is Runcode - Initialize(). Initialize is a procedure in a global...
2
by: PeteCresswell | last post by:
I've got a routine that loads a tree control. Works a-ok the first time around, then bombs the second. Works the third, bombs on the fourth....i.e. it works every other time it is invoked. ...
5
by: MLH | last post by:
I have problems getting the CTRL-d, CTRL-w and other 'hotkey combo' assignments to work in Access 97. I just imported the autoexec macro directly from Access 2.0, so its no surprise. Some are...
19
by: Mockey Chen | last post by:
I using #define as following: #include <stdio.h> #define LOG_PREFIX "Current function: <" __FUNCTION__ ">: " int main() { printf(LOG_PREFIX "some thing.\n"); return 0; }
12
by: Laurent Deniau | last post by:
I was playing a bit with the preprocessor of gcc (4.1.1). The following macros expand to: #define A(...) __VA_ARGS__ #define B(x,...) __VA_ARGS__ A() -nothing, *no warning* A(x) -x ...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
9
by: jedi200581 | last post by:
Hello, I have a singleton class that I'm using through macros: //snippet #define DO_SOMETHING ( myArgument) \ { \ MyClass *myObject = MyClass::getInstance(); \...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.