Access 2010 returning error code when trying to subform "On Load" event
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
MS Access 2007 form.Load
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"
Private Sub Form_Load()
Const dbg = False
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"
Returning to Control
I have a form which contains a subform.
In the subform's Exit event I have the following code:-
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"?
Error Message when running 'On Load' VBA code / Macro
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).
Gotorecord unfilled subform
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
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:
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?
Compile: File Not Found
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.
Property not found - only getting error since upgrading to 2010
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:
The other one I am having issues with is this, on a different form:
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
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
ApplyFilter to form on Load error
I have a form called "frmsurveyviewer" that loads a set of data that has been filtered according to specs on another form called "frmfilterrecordset". A button on frmfilterrecordset opens the frmsurveyviewer, and the following vb code is on on the Load event.
Private Sub Form_Load() DoCmd.ApplyFilter "filterviewer", "[day]='" & [Forms]![frmfilterrecordset]![TXTDATE] & "' And [site]=" & [Forms]![frmfilterrecordset]![COMBOLOC] & "" End Sub
It has been working fine for a couple weeks now, and now it gives this error
Runtime Error 3011: Microsoft Databse Engine could not find object "filterviewer".
It's true that there is no "filterviewer", but this has been working fine up until now. It still works on my computer, but now anytime I load the database onto another computer, it doesn't work.
Why might this be happening
Error - "Object or class does not support the set of events"
the below error suddenly appeared today.
Been using database for a few years, but lately started going back and forth between access 2007 and the older one.
(getting previous version doesn't help)
"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.
*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
You do not have exclusive access to the database
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...
Clicking on any button: user defined type to defined
My database takes around 3 minutes to compress and repair. It will make a slow computer to hang for that period. Again there is this form that whenever Itry to open it, it gives this error:
"the expression on Load you entered as the event property produced this error: user-defined type not defined".
the strange thing is that the form has no event on Load.
In addition, when that form opens, trying to move the mouse gives the mouse move error:
"the expression mouseMove you entered as the event property produced this error: user-defined type not defined".
Clicking on any button gives:
"the expression on Click you entered as the event property produced this error: user-defined type not defined".
"the expression on unLoad you entered as the event property produced this error: user-defined type not defined".
Access form gives #error after changing it in design view.
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."
Dlookup Runtime error
I am new to this so please go easy on me.
I am using Access 2010 and wish to have the address details added to the form once the pickup location is added [code below] but it keep returning a run-time error and I dont known were I have gone wrong.
Access lookup table is tblKalSuppliersLocations_OLD
Updated field is TransportRequestPickupLocation
Returned field wanting Branch Suburb
Private Sub TransportRequestPickupLocation_AfterUpdate()
TransportRequestPickupAddress1 = DLookup("Branch Suburb", "tblKalSuppliersLocations_OLD", "[Branch #]=" & TransportRequestPickupLocation)
Runtime Error 3075 - Access 2010
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.
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.
After update of check box gives error
I have a check box on a form and was trying to write code for the after_update event.
"The expression After Update you entered as the event property setting produced the following error: A problem occurred while Genetic Disease Database was communicating with the OLE Server or Active X control"
Not sure why this is occurring.
and in the property of the check box is Event - after update : is [event procedure]
Haven't had trouble like this elsewhere.
I tried commenting out the code and still get the error. I tried a new check box and still get the error.
I tried the code in "on click" and still got the error.
Can you not have any event procedures for a check box? How am I supposed to handle this in VBA? I need to do is open a new form if check box is checked.
I have this piece of code but is returning the error "You entered an expression that has no value":
Private Sub Frame76_AfterUpdate() If Me.chkFinal = Yes And Me.ScheduledNumber < Me.CourseMInDel Then
MsgBox "There are less than the minimum amount of delegates scheduled on this event.Please check before finalising" ElseIf Me.chkFinal.Value = Yes And Me.ScheduledNumber > Me.CourseMaxDel Then
MsgBox "There are too many delegates scheduled on this event. Please check before finalising" End If End Sub
Not sure why this happens. I wrote this more as pseudocode as I'm not sure of the correct syntax and am experimenting. Me.chkFinal is a tickbox inside a option group (I have only one option so far in it, I may add others later) . Can anyone point me to where I can solve this
Access 2007, query, criteria, formula is returning "#Error"
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.
Access 2010: Setting Report Textbox Backcolor from Field Condition
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.
I've tried the following code in the Report Event Procedures "On Load" and "On Open" but it does not work