PDA

View Full Version : Need help to resolve the error



valchyshen
09-01-2008, 04:45 AM
I have a database that works fine on the PC with OS Windows XP. I tried to run the same database on my new laptop with OS Windows Vista installed. It appeared that under Vista the database does not work. MS Access interrupts on every instance when a user makes a click on the button that opens another form. In particular it shows the error window with following text (my translation from Russian to English may not follow exactly its wording in English version of MS Offfice):

"The error is in the expression Button Click, which is included into the field of Event Properties: the error occured when Microsoft Office Access tried to establish a link with OLE server or ActiveX control."

I would appreaciate your any idea on how to resolve this problem.

Thank you!

shamsam1
09-01-2008, 05:04 AM
which version of office ur using.

u should change security option it may be set to high.just make it low

Enable the macros

valchyshen
09-01-2008, 05:16 AM
Hi! Thank you very much for your prompt reply.

I'm using MS Ofiice 2007.

shamsam1
09-01-2008, 05:23 AM
check this link and enable macros for access..then save access and open again.

http://office.microsoft.com/en-us/help/HA100310711033.aspx

valchyshen
09-01-2008, 06:05 AM
All macros options are enabled. It still does not function. I noticed if a button runs a macro module, then it is ok. While it runs a VBA macro then it shows that error.

shamsam1
09-01-2008, 06:09 AM
do paste the code which ur using

valchyshen
09-01-2008, 06:23 AM
It's very simple. It is a db with one form, which has a button.
Option Compare Database

Private Sub btClick_Click()
MsgBox "Hello, World!"
End Sub

shamsam1
09-01-2008, 08:45 AM
i am bit confused ,wel other will help u out..just update ur vesta

Mavyak
09-01-2008, 09:21 AM
Sometimes when you manually type an event procedure, for some reason VBA doesn't associate it with the object. For instance, if I create a button on a form and then go to the code module and manually construct the event procedure (including the "Private Sub Command1_Click()" and "End Sub" portions), VBA doesn't always associate it to Command1. But if I got to the object's properties page and select "Event Procedure" for the OnClick event, and enter my code in the prefabricated shell that Access provides (where Access inserts the event definition for me) then my code works.