Results 1 to 3 of 3
Thread: Runtime Compile Error
2001-03-05, 16:30 #1PatriciaWilliamsGuest
Runtime Compile Error
... Please don't spend any time on this, but if anyone has a suggestion, I would be most grateful. This refers to the usual catch-22 error where there is no compile error when I run it with a full version of access, even if I force it with a /runtime switch:
... "Compile error in hidden module: Utilities", halts the autoexec macro on the call to checkrefs(), a function cut 'n pasted from Microsoft to over come the MISSING references problem (in this case, comctl32.ocx) -- HOWEVER, if I remove the call to checkref's, it just fails on the next call to open my MainForm -- once again, a call to the Utilities module. (Hmmm.. it just dawned on me .. would Microsoft have a clashing library named utilities?) Next step was that I removed all references to any code in Utilities in the mainform, and -- it still crashed, but I can't remember if it was the same error or another one that went something like "There was an error in compiling this VB module ..". I was trouble-shooting this long distance.
2001-03-06, 05:41 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Runtime Compile Error
The common dialog control can cause all kinds of grief, especially if its version doesn't match things on the target machine. If you have the Office Developer version, you have a license to redistribute the comctl32.ocx, but if you include it in your setup, you still may run into version problems on the target machine. The VB 5 and VB 6 versions of the control aren't compatible both ways, for example. Using the runtime switch on a machine with Access installed won't test things like that, unfortunately.
You will keep getting errors until you track down the source of them. I'd start by creating a version of the application without the common dialog and see if it has problems in a runtime version. If so, you don't have to look any further to find the source of the problem. The solution is harder. I avoid the common dialog control and use a class wrapper around the Windows API calls to the common dialog library. That works, regardless of versions on different machines, although it takes more code to start with. You can actually buy the code and a license to redistribute it in your applications at and <A target="_blank" HREF=http://www.fmsinc.com/>FMS Inc includes calls to the common dialog in its Total Sourcebook product.
Microsoft does have an Access library called Utilities--it's an add-in, and I don't believe its redistributable.Charlotte
2001-03-06, 23:53 #3PatriciaWilliamsGuest
Re: Runtime Compile Error
.....I want to thank you for your response, which (that and the checklist posted by Dev Ashish on the Access Web, to which someone here referred someone else, but I lurked!) gave me confidence.
.....I had earlier removed the comctl32.ocx, thinking that that might be the problem -- and it hadn't changed anything. More on that in a minute!
.....Anyway, I removed calls and code to checkrefs(), removed the menu-builder wizard module, removed the menu builder add-in, and ran the setup, and it worked!
.....Then I thought I'd try adding everything back in. When I got to the comctl32.ocx, it broke again.
.....The thing was, I had removed the comctl32.ocx reference long before that, thinking that that was the problem -- and I was still bombing. It _is_ possible that I didn't recompile the code after removing the comctl32.ocx reference -- would that have still kept a "ghost" reference?
.....The other thing is, that, I had a reference to comctl32.ocx for the last 2 months -- and we have had the version problem, but when I fixed that it worked well ... hmmm and argh.
.....Well, I don't need the comctl32.ocx. I think I thought I needed it, earlier.
.....Anyway!! I see that perhaps I ought to learn a little bit about "class wrappers around API calls aauuughhh!!!), _and_ it's also nice to know that this is available for purchase should I decide to get a little fancier while still trying to avoid pain <g>.
.....Thanks very much for your feedback!