No event codes will work

  • Thread starter Thread starter McLean J
  • Start date Start date
M

McLean J

New database in Access 2000. I tried to use VBA for a
simple calculation and it failed. So I tested just a
simple Message Box and got the same error...
Here's my code.
Private Sub dtmDate_Exit(Cancel As Integer)
MsgBox [dtmDate], vbCritical, "test"
End Sub

I get this error...
The expression On Exit you entered as the event property
setting produced the following error: A problem occurred
while Microsoft Access was communicating with the OLE
server or ActiveX Control.
I'm not using any OLE controls or ActiveX controls.
 
Hi,

Besides Allen's good suggestion, it could be corruption issue (form or
other object corrupt), we can try to importing objects into a new database
file to fix the issue:

1) Create a new, blank database and call it: Test
2) Open this database and from the File menu option choose Get External
Data, then select Import.
3) Browse to your existing database that is causing the problem, highlight
it and click Import.
4) You should now see a small "database window" that displays all the
objects from your existing database. On each tab (tables, queries, forms,
etc.) there is a
Select All button - click on each tab and click this button.

5) If you have any custom tool/menu bars, click the "Options" button and in
the
bottom left corner you will see check boxes to allow the importing of these
items -
please make sure these are checked if needed.

6) Once all tabs are completed, and step #5 has been verified, click OK.

7) Once the import process has completed (assuming there were no errors)
you will
be in this new "Test" database. What is the result?

Please feel free to reply to the threads if you have any questions or
concerns.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "McLean J" <[email protected]>
|
| New database in Access 2000. I tried to use VBA for a
| simple calculation and it failed. So I tested just a
| simple Message Box and got the same error...
| Here's my code.
| Private Sub dtmDate_Exit(Cancel As Integer)
| MsgBox [dtmDate], vbCritical, "test"
| End Sub
|
| I get this error...
| The expression On Exit you entered as the event property
| setting produced the following error: A problem occurred
| while Microsoft Access was communicating with the OLE
| server or ActiveX Control.
| I'm not using any OLE controls or ActiveX controls.
|
 
Back
Top