The expression On Mouse Move you entered as the event property setting produced error

ria.arora

Registered User.
Local time
Tomorrow, 03:42
Joined
Jan 25, 2012
Messages
109
Hi,
I have error message on every event I have in a single form. I get below error when I move the mouse (Did not click anywhere). The error message is:
Code:
The expression On Mouse Move (in this case) you entered as the event property setting produced the following error: statement invalid outside Type block.
*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.
I don't understand why I have this error :mad: Can anybody plesae let me know what's wrong?
Error pops up before Form_Load() executed.

Thanks
 
Does this only effect the one for? And do I understand that it appears on any event that you try and code on that form?
 
Yes this appear only in one form.
 
Thanks ... Solved...I forgot "Dim" while declaring the variable
 
After a lot of back and forth on my database, I had the same error. And what seems like a solution... at least so far it has worked like a charm. I opened the form in Design view and on the On MouseMove property, I selected the code option. In the coding space, I wrote - MsgBox ("All is Well") That's it. There has been no error since. I think, the change in window sizes during rapid transitions between design and working modes might have prompted the error. The code snippet thus created might be best addressed by letting it run out explicit by an innocuous thing like MsgBox. Off course there will definitely be a technical explanation to this but until someone comes out with it, this urban legend may well do :)
 

Users who are viewing this thread

Back
Top Bottom