VBA not running in after update event. Run-time error '2113'
There is VBA code behind ED_disposition field in the after update event.
When I change its value, I keep getting a run-time error "2113", saying the value you entered isn't valid for this field.
I am not sure what my problem is. Does this have to do with table level look up again?
Also, is it legitimate to write 3 if statements the way I did in the code? They are basically 3 scenario checks
Thank you for taking the time to report an issue.
What's wrong... Please write below.
When I run debug, it fails at the 2nd line of code below:
My excel links the CCL data from Access via the below details and from what I know, nothing has changed. I've googled the error and it seems to mention an awful lot that there could be a problem with the link but I'm very inexperienced with Access and not quite sure where I should be looking.
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).
Run-time error '-2147352567 (80020009)':
You can't assign a value to this object.
What I'm trying to do is record the date and time whenever a record is modified. I'm using the "Before Update" event to run the following code:
I don't know why it won't work. This is something that seems about as simple as it gets. I've Googled the error and everyone is suggesting missing references and untrusted locations as thecause but neither of those apply to this as I have no missing references and the location is trusted.
"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.
Since I'm pretty sure that this procedure needs to be coded with the OnClick event, I'd like to create a vbOKonly message that tells users the PDF file does not exist because the criteria on the FollowHyperlink string is not met.
I have a small grasp of error-handling, but I can't seem to complete the full procedure and resume normal functions (due to the VBA syntax errors I keep stumbling on
This error happens when I do the following.
1) Select an item from a combo box. (data from another table)
2) Next, click a button to open another form.
3) This action should take the data from the combo box, then query a table for info that will be displayed in the next form.
Like I said earlier, it works great in 2003. I've been told that it may be a reference issue.
The problem I have is, a function which is used a lot triggers a series of queries which on their own run fine, however as it's used by about 10 users it's causing the db to crash.
The queries which are running only need to be ran once every 5 minutes or so, so, what I'm looking to do is scheduale a SINGLE update to happend every 5 mins so that only one event of th query happens.
The only way I can think to do this is to have a manager (1 user only) open a form in the background which triggers the event every 5 mins (not sure how to run a macro on a loop on timer in VBA).
Does anyone have any better ways? (If my rambling above makes any sense
Its not causing a major functionality issue but it does make it a lot easier for users to get to the coding through the debug button which I don't want to happen