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: 38
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...

 

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"
 

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!
 

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.
 

2010 VBA "do while" code in a macro

2010 VBA "do while" code in a macro Icon
In Access 2010, want to run perform a "do while" loop in a macro. I understand VBA is the way to do this. So, I think I want to run a VBA script in a macro.

This Macro runs against a Form that has a SubFrom (MainForm named "Expense ID" & SubForm, "Expense"). Macro is initiated by pressing a button.

I would like help with some VBA code showing how to perform the following:

1. Evaluate a field ("Activity") in the first record of Subform ("Expense") against condition "Is not Null".

2. If condition is true, set value of another field ("Post") in the same SubForm record to "1".

3. Move to next record and repeat steps 1 & 2 until all Subform records are evaluated.

4. Return to macro that initiated the VBA script to perform the next action in the macro.
 

Runtime Error 3075 - Access 2010

Runtime Error 3075 - Access 2010 Icon
We use an access database for our Human Resources department. Recently we updated to Access 2010 on a couple of workstations. In Access 2010 we keep getting Runtime Error 3075 missing operator. I click debug and this is where the error is happening.
[CODE]
While playing with the code I noticed if I take out the "AND" in the bold line above. The error is removed within Access 2010; however, it creates the same error in Access 2007, 2003. We still have a couple users that utilize Access 2007 and need it to function properly in both instances.

This is a program that I have inherited and my programming skills are minimal at best.

I have worked on this for several hours already, or 2007; however, not in both.
 

Access form gives #error after changing it in design view.

Access form gives #error after changing it in design view. Icon
I am using Access 2010. In my procurement database form when I am doing some changes in design view, some field give error some buttons and combo boxes does not work and gives the following "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 formis set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired."
 

Access 2010: Setting Report Textbox Backcolor from Field Condition

Access 2010: Setting Report Textbox Backcolor from Field Condition Icon
I have an Access 2010 Report in which I'd like to be able to set the Textbox Backcolor property based on the condition of another field value within the same record of the Report.

For example:

I've tried the following code in the Report Event Procedures "On Load" and "On Open" but it does not work
 

Access 2007, query, criteria, formula is returning "#Error"

Access 2007, query, criteria, formula is returning "#Error" Icon
I have a query in an Access 2007 database that is returning an "#Error" message.

It looks like this:
Hour %: [SumOfOT Hrs]/[SumOfReg Hrs]

One of the entries in the "SumOfReg Hrs" is 0, and that is the one returning the error message. None of the other entries have a "0" in either "sumOfOT Hrs" or SumOfReg Hrs" fields and they return data.

I tried this:
IIf ( IsError ([SumOfOT Hrs]/[SumOfReg Hrs]) , "0", [SumOfOT Hrs]/[SumOfReg Hrs])

But it still gives me the "#Error" message.