Topics Search

Access 2010 returning error code when trying to subform "On Load" event

Access 2010 returning error code when trying to subform "On Load" event
Views: 37
Receiving the following in Access 2010. “This error occurs when an event has failed to run because the location of the logic for the event cannot be evaluated. For example, if the OnOpen property of a form is set to =[Field],this error occurs because a macro or event name is expected to run when the event occurs.”

To create this error: with a tab control, on one of the tabs is a sub-form. When I select the “On Load” event for the subform I get the above error.
Sponsored Links:

Similar posts...

 

Load Order?

Load Order? Icon
I am working in MS Access 2010. I have a login form for that is set to load from the "Display Form" property of the Current Database tab. Basically the login form loads first thing when the database is opened.

I have created a function that checks the server for latest FE version and updates it if needed. The code is located in the form's "On Open" event.

I have some problems with some users with the FE client getting corrupted while updated. It think it might have something to do with my code running a bit slow and the form tries to load while the code is attempting to delete and copy over new files.

Is there a better way of relocating my update code? Should I put it in the "On Load" event? I am thining of creating a macro with my update code. Will this be better?

Database opens -> runs Macro -> if update needed delete and copy over new db -> if no update then continue to load login form
 

Returning to Control

Returning to Control Icon
I have a form which contains a subform.

In the subform's Exit event I have the following code:-


DoCmd.GoToControl "cboBenchmarks"
Me.Answerssubform.Enabled = False

When I exit the subform and go to the control "answertype" (or any other control other than "cboBenchmarks"), it naturally goes to "cboBenchmarks". How can I modify\add code that will detect that I have gone to "answertype" control and get it to go there naturally after it went to "cboBenchmarks"?
 

MS Access 2007 form.Load

MS Access 2007 form.Load Icon
I have just installed MS Access 2007 having previously used 2002. 2007 will run my .mdb files ok. It allows me to create .mde files. I can open a form ok provided there is no code in "On Load"
However,

Private Sub Form_Load()
Const dbg = False
End Sub

2007 displays the following error:-
"the expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events"
 

Gotorecord unfilled subform

Gotorecord unfilled subform Icon
all,

Ive created a form (customer) with a subform (product) in access.

The question is how can I make the form automatically navigate to customer that still didnt have any product, considering all the customer info has been filled?

I have made a query that shows all the customer that still doesnt have any product. Then I made a code at "on load event". This is the code

DoCmd.GoToRecord acDataQuery, "no product", acFirst

But when I try to run it, I get Runtime error 2046, gotorecord isn't available now
 

Access 2010 error when referencing sub report in open event

Access 2010 error when referencing sub report in open event Icon
I have been working on migration of large ADP project from Access XP to Access 2010 and have been faced with many problems.

One of the problem is that there is thrown error when referencing sub report in its Open event.

I have a report called Main and it contains subreport control called sbrLine. In sbrLine sub report control I have placed report Line.

Open event of Line report contains following code:

MsgBox (Me.Parent.sbrLine.Report.Name)

It was working in Access XP, but it fails with error in Access 2010.

The error is #2455 "You entered an expression that has an invalid reference to the property Form/Report."

Is this a bug in Access 2010?
 

Error Message when running 'On Load' VBA code / Macro

Error Message when running 'On Load' VBA code / Macro Icon
I've entered some code in the 'On Load' portion of my main form, designed to pop up a confirmation dialog asking the user if they want to run a macro to update the DB's tables with current data from some linked tables. when loading the form, however, I get this message:

The expression On Load you entered as the event property setting produced the following error: A problem occurred while 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.

in addition, the "Show Help" button on this error message gives the following information:

This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.

I don't really understand what this means, to be honest. the same code/macro combo worked perfectly fine on another form I created (and subsequently lost, which is why I'm recreating it).
 

Property not found - only getting error since upgrading to 2010

Property not found - only getting error since upgrading to 2010 Icon
Our department users an MS Access database file created in an old version of access. The purpose is to maintain records of what access our IT users have to our systems.

Since upgrading to Access 2010 I have been getting a "Property not found" error upon using the existing Save button on multiple forms. The error occurs only when data in the record has changed. Converting the old .mdb file to .accdb format hasn't solved the issue.

The Save buttons have "On Click" event procedures associated with them.

The first one is as follows:

[CODE]

The other one I am having issues with is this, on a different form:

[CODE]

I have no idea where to even start with figuring it out as the error doesn't even try to take me into Debug mode - it's a very unhelpful error with an "OK" button and nothing more!
 

Error message interpretation Access 2010

Error message interpretation Access 2010 Icon
So far Access 2010 and I aren't friends (although the flashy combo buttons are quite good fun)

Anyway. I keep getting an error message that says "The expression On Error you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communication with the OLE server or Active X control"

This is just with a button opening a form - nothing fancy. I am able to click through it - but I can;'t get rid of it. have tried all the old favourites ( compact and repair, open and close, reinstall) but to no avail. When I look at the on click event it is an embedded macro not an Event procedure. I just did with the wizard - why is it coming up like this - Access 2007 used to come up as an event procedure
 

Compile: File Not Found

Compile: File Not Found Icon
I don't know what happened. I was just doing basic cleanup of forms and reports. Now any event that fires gives me an error - all based on "File Not Found". (ex On Load you entered as the event property setting produced the following error: File Not Found").

I have done Compact/Repair. Also when I compiled the code I get a "File Not Found" error.

I don't know what I did - things were working just fine then of a sudden this issue - I was not modifying/adding any code.
 

You do not have exclusive access to the database

You do not have exclusive access to the database Icon
I was trying to change the call code in the "ON LOAD" event line for Access 2010 and did something that now will not let me do anything relative the module. I get the message "You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later". I am the only person using this computer/software. I simply want to delete the module so that I can move on...
 
Sponsored Links: