|
|
Up |
|
|
  |
Author: PsyberFoxPsyberFox Date: Mar 19, 2008 04:24
I'm getting the following error:
"The expression On Timer you entered as the event property setting produced
the following error: A problem occured while MSA was communicating with the
OLE server or ActiveX Control.
The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
There may have been an error evaluating the function, event, or macro."
The event procedure is as follows:
Private Sub Form_Timer()
lblRememberInfo.Visible = Not lblRememberInfo.Visible
End Sub
And the Timer Interval is set to 500.
I have the same settings and a similar event procedure on another form, and
it works fine... please help!
Thank you!
|
| |
|
| | 7 Comments |
|
  |
Author: Allen BrowneAllen Browne Date: Mar 19, 2008 04:29
Open the code window, and choose Compile on the debug menu.
That should lead you to the line that Access it not able to compile.
(It could be anywhere in your app.)
If it compiles okay, run a decompile.
This recovery sequence should pin it down:
http://allenbrowne.com/recover.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"PsyberFox" discussions.microsoft.com> wrote in message
news:A07843E0-6901-42EE-8ACA-08E79F787938@microsoft.com...
> I'm getting the following error:
>
> "The expression On Timer you entered...
|
| Show full article (1.33Kb) |
|
| | no comments |
|
  |
Author: PsyberFoxPsyberFox Date: Mar 19, 2008 04:40
I only have this single sub on this form... and compile and decompile does
nothing...
W
"Allen Browne" wrote:
> Open the code window, and choose Compile on the debug menu.
>
> That should lead you to the line that Access it not able to compile.
> (It could be anywhere in your app.)
>
> If it compiles okay, run...
|
| Show full article (1.53Kb) |
| no comments |
|
  |
Author: Allen BrowneAllen Browne Date: Mar 19, 2008 05:04
There is something drastically wrong here.
I don't see how the app can compile if the code is invalid.
Make sure you have:
Option Explicit
at the top of this module.
Then be explicit about what you are referring to, i.e.:
Me.lblRememberInfo.Visible = Not Me.lblRememberInfo.Visible
Copy everything from this module out to Notepad, and save it.
Then set the form's HasModule property to No.
Answer yes: you do want to lose all the code.
Compact.
Compile
Test the database.
Is the problem still there?
(One you have tracked the culprit down, you will paste the code back into
the form's module, of course.)
|
| Show full article (2.28Kb) |
| no comments |
|
  |
Author: Stefan HoffmannStefan Hoffmann Date: Mar 19, 2008 05:08
hi,
PsyberFox wrote:
> "The expression On Timer you entered as the event property setting produced
> the following error: A problem occured while MSA was communicating with the
> OLE server or ActiveX Control."
> I have the same settings and a similar event procedure on another form, and
> it works fine... please help!
In some cases this indicates a broken ActiveX registration or a broken
reference...
mfG
--> stefan <--
|
| |
| no comments |
|
  |
Author: PsyberFoxPsyberFox Date: Mar 19, 2008 05:44
Hi,
I've followed your suggestions... and this is what I've found:
1. I've removed all code from this form.
2. All other buttons' code works from all other forms - tested all
3. Compact; Compile - no problem
4. As soon as I add any code on this form, even something as simple as
merely opening another form and closing this one, then it gives exactly the
same error...
Rgds,
"Allen Browne" wrote:
> There is something drastically wrong here.
>
> I don't see how the app can compile if the code is invalid.
>
> Make sure you have:
> Option Explicit
> at the top of this module.
>
> Then be explicit...
|
| Show full article (2.83Kb) |
| no comments |
|
  |
Author: Allen BrowneAllen Browne Date: Mar 19, 2008 05:57
Assuming there are no ActiveX controls on this form, you might try the
SaveAsText/LoadFromText trick here:
http://allenbrowne.com/ser-47.html#SaveAsText
Don't skip any of the steps.
If you have not yet done so, it would be worth compling the recovery
sequence in order:
http://allenbrowne.com/recover.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"PsyberFox" discussions.microsoft.com> wrote in message
news:A29B8E92-00B9-42D2-8758-49430355CB7E@microsoft.com...
> Hi,
>
> I've followed your suggestions... and this is what I've found:
>...
|
| Show full article (3.56Kb) |
| no comments |
|
  |
|
|
  |
Author: PsyberFoxPsyberFox Date: Mar 19, 2008 06:06
OK let me tell you what I've done in the meantime... I copied my form
(without code) over to a slightly older version of the db, also copied the
menu forms and new queries that is run by these forms.
I then copied the code that I saved in notepad for this form back to this
form, and voila! The only thing that I can think of that did change between
these two versions, is a pop-up calendar that I downloaded from one of the
people on this website... the old version did not have this import, although
I deleted all code I could find in my db... so it must'v been something in
it's code that caused this to happen...
Thank you anyways for your help...
"Allen Browne" wrote:
> Assuming there are no ActiveX controls on this form, you might try the
> SaveAsText/LoadFromText trick here:
> http://allenbrowne.com/ser-47.html#SaveAsText
> Don't skip any of the steps.
>
> If...
|
| Show full article (4.46Kb) |
| no comments |
|
|