Old event procedure not working in Access 2007

G

Guest

Have a db created probably in Access 97, or earlier, that has worked in
access 2000 for 5 years just fine. After installing Office 2007 (left the
2000 versions of Access, Word, and Excel on the PC) I have a problem with
it. Double Click on the file name, Access 2000 opens the db ok and displays
the Main Form which has 4 command buttons. When I click on 3 of the 4
buttons I get the following error:

The expression On Click you entered as the event property setting produced
the following error: Object or class does not support the set of events.

· 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 evaluation the function, event, or macro


When I switch to design mode and try to inspect the event procedure I get
the following error:

“Microsoft access for windows has encountered a problem and needs to close.
Bla, bla,blaâ€, and Access closes.

The db functions normaly on a networked PC that does not have 2007
installed, both units are running XP home. On the second unit I was able to
look at the Event Procedure that seems to be causing the error. See below
---------------------------------------------------------------------------------------------------
Option Compare Database
Private Sub Button0_Click()
On Error GoTo Err_Button0_Click

Dim DocName As String
Dim LinkCriteria As String

DocName = "Record Expenses"
DoCmd.OpenForm DocName, , , LinkCriteria

Exit_Button0_Click:
Exit Sub

Err_Button0_Click:
MsgBox Error$
Resume Exit_Button0_Click

End Sub

What is going on here. When will I ever learn to NEVER, NEVER, NEVER
install version 1.0 of ANY software.
 
M

missinglinq via AccessMonster.com

Apparently not soon enough! Sorry ;0(>

My personal standard is to never install any Micro$oft software until at
least 3 years post-premier!

You say you left Access 2000 on your machine, but are you running the
database thru AC2000 or thru AC2007? As I understand it, there are several
things that need to be done in order to run VBA code under AC2007. I forget
the ends and outs, but I think it involves placing things in a "trusted"
folder and some other things. I'd try Help and put in *VBA* or maybe someone
will pass by here and be able to give you more specific advice.

Out of curiosity, what was behind door (button) #4, the button that didn't
threw an error?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top