Getting random error: "The expression On Change you entered..." - sql-server-2008

Running Access 2010 on Citrix against a SQL Server 2008R2 backend. Occasionally my users will get an error reading:
The expression On Change you entered as the event property setting produced the following error: Overflow.
* 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.
Once a user gets this error during a session, he will continue to get it until he logs out of the database front end. He can then immediately relaunch the Access front end and go do whatever it was he was attempting to do. The On Change portion will vary in event type (sometimes On Click, sometimes After Update, etc), and it will happen on different forms, but the fix is always to exit the DB then get back in and everything just works fine.
The more I learn, the more I'm starting to believe that it's got something to do with the Citrix enviornment that we're in, but I haven't been able to pin anything down.
I've seen the suggestions to copy the form, and to start with a new DB and import everything. I've done these and it hasn't really helped - i.e. this is random enough that I don't know if the frequency of issues decreased significantly after the change.
Does anyone have any additional suggestions of what I can do in my Access code?
Does anyone have any experience with this setup and have some Citrix or SQL Server tweaks that I might be able to pass along? (I don't know if our IT people will listen or try to work with me on it, but it's worth a shot.)
I'm frustrated with the randomness of this, and I hate telling my users there's nothing I can do about it, but at the moment, I'm completely stumped.
Thanks,
FreeMan
Edit - Additional details...
the users are running a compiled .accde
they are all running from a common .accde file
this is still happening for a few users to whom I have given their own personal copy to run

The goto fix for random weird stuff happening in Citrix is to disable hooking. Hooks get injected into every process running in a Citrix session, so they could be screwing up something in Access. You can configure registry entries to exclude Access from being hooked:
http://support.citrix.com/article/CTX107825

Related

Access err 2004 - out of memory

I have several clients that I make databases for, all are pretty similar... They all have a screen with current data displayed. This screen/pc combo also sends some emails, uploads data, etc... usually without problems... however, one client keeps getting an 2004 (Not enough memory) and 3035 (system resources exceeded). I have tracked the memory usage on the device and it hasn't gone about 50%. I ran a memory test and no errors were found.
Today, I notice the error and was able to try a few things. With Access open, I could not open or design view any forms. Some queries I could get to open to SQL, but not design view. Crosstab queries would not open in design or SQL. Neither would open and show any data.
These errors are usually logged, and I will get several 2004s in a row, then it will switch to several 3035s, then eventually it will just quit altogether. Closing Access and reopening will always fix it (for a while).
I have decompiled and recompiled. I have tried accdb and accde versions. This is Access 2007. What should I try next?
Can't add as comment, but one thing to try would be to check the service pack level for Access, the latest for Office 2007 is SP3.
Also, if the issue is with multiple forms, then it could indicate database corruption rather than issues with individual forms. Have you tried to import all objects into a brand new container and run it from that?

Windows Task Scheduler and MS Access 2013

I am trying to utilize windows task scheduler to distribute Access reports to End Users in my company.
All I am doing is triggering a macro that runs code from a module which exports a report to a PDF, prints it out, then exits access.
DoCmd.Quit acQuitSaveNone
That's what I've been using at the end of my code in VBA to close access after running a macro.
When I manually run the macro it works fine, but when scheduled on a task, it gets held up a lot and stuck.
I've checked event viewer to try and find any Microsoft Office alerts but do not see any.
It appears that Access is unable to quit many times when running through Task Scheduler. Would there be a VBS I can run, say, 5 minutes after the task to close down the .accdb file and MSACCESS.EXE or is there something I can do to make these Tasks actually work??
It seems maybe when running in the background through task scheduler.. the code is getting ahead of itself and trying to quit at the same instance that it is finishing the output to the printer, causing it to seem "busy" and unable to actually close?
I have an entire domino of code that shoots off after this but it stops dead in its tracks when it cannot finishing closing access.
Any suggestions?
Thanks,
Ian
Here is the gist of what I would do, I am just addressing the print on open and quit actions. You may need to tweak to ensure that you have validation etc in place.
First, make sure that your report has a default printer specified. (Report design-->Page Setup-->Page-->Use Specific Printer and then select your printer)
Create an Autoexec (auto execute) macro, this macro will be saved with the name Autoexec. Macros named Autoexec executes when Access is opened automatically. Note that once you have this macro, it will run each time you open Access, to prevent it from running, hold down the shift key and then open Access, this bypasses the Autoexec
First action in your Autoexec Macro is OpenReport and set the View to Print (report is printed when opened)
Next action in your Autoexec Macro is QuitAccess with options set to SaveAll.
When you run an application from the scheduler, it runs with different credentials. You want to make sure that you choose the appropriate options here.
Fixed it. Very glad as I've seen many with this issue and hope this gets to them.
If anyone has any issues regarding access macros and task scheduler and this doesn't work - I'll be happy to help as best as I can as the frustration of wanting to remove administrative tasks through automation that don't work out is just terrible.
Since I needed the task scheduler to wake the computer up, log me in, and open access databases on network drives that reference SQL servers.. there was a couple things I had to make sure were set up.
First is trusted locations. Any network drives you are access should probably be in the trusted locations.
Secondly, my last command on the macro is DoCmd.RunCommand.Close (I believe.. if im wrong Ill change tomorrow when I'm back in the office)
Third, use the root path to the network folder and not a mapped drive as they may not map when your logged off... so instead U:\file path... would have to be \computer1\filepath\ etc..
This path should be made with all linked tables or databases among the network especially if you have code calling for those files.
Fourth, I ended up having to do it the less preferred way and have a folder called "accessjobs" where I put shortcuts to Access Macros which triggered code and simply ran that path in task scheduler with "start in:" the folder the macro shortcut is in.
Fifth I had to run with highest privileges, and selected "run whether user is logged on or not"
A couple of these things may be coincidental that they work, but I am not about to spend even more time with trial and error to see which settings are benine as I spent TOOO long figuring this all out. But now it is solved and the sky is the limit now!
Thanks for the help!
Ian

Access "An error occured while Access was commnicating with OLE server"

So I started with the Access contact database template and have been building up from there. There is a functionality in which by clicking on the ID number in the Contact List, it should call up the form to edit the details. I have made no changes to this code, and have even tried recopying it from the template from scratch.
However I am getting the error "A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control." It is telling me to restart the OLE server and try the operation again.
I have an old version of the database saved, and it runs fine over there. It just is something within my code here.
Any guidance would be appreciated.
All of solutions I found online was not working for me.
Found that only rebuilding damaged form from scratch help me to solve this issue.
W10, Office 2016.
I have ran into this error three times in my database. Each time to fix it I simply just open a new blank project and import everything from your old project into your new project.
This might sound like a large undertaking basically you just go into the new project and select "Import Access Database". Then just run through the wizard selecting everything in your current database. Click okay and let it run for a few minutes.
This has fixed it for me every time I have run into your error. I suspect it is just something to do with corruption.
My programs also run into this error sometimes.
I have recently noticed that the error most often occurs on UNBOUND forms (forms without a RECORDSOURCE).
What I have done most recently for these forms is the following:
Add "some" table (I usually take a Config table with just one record) as the RecordSource.
Compile the program code (this usually goes well, even before the fix!).
Save the form
Open the form. This should work fine now!
Remove the form's RecordSource, recompile and save again.
The form should still work fine!

Microsoft Access Fixes not Propagating/Errors Not Reproducible In Dev Environment

OK so this is kind of a general question here. We run an ASP/C# Site that's fed by a SQL 2008 R2 database.
Our data entry takes place using Microsoft Access 2007 and feeds to a SQL 2008 R2 instance.
Our data entry forms (all .adp) are generally simple, but we randomly run into problems where I'll post a change to the DB (we have a script that runs at night and will archive our old DB versions in the form of "DB_NAME.adp03122012" and keeps the newest revision as "DB_NAME.adp". This way, our data entry team will just need to click on a network shortcut to access the Access forms.
What we're running into is non-reproducible errors of varying types on random machines.
Example, I make a simple search that has a combo box and a search button. You select the item you want to search for and it updates the record source to search for that PK/FK. It works fine on my developer box. It works fine on certain end-user boxes. But on others, it throws a run-time error:
"Run-time error 2467: The expression you entered refers to an object
that is closed or doesn't exist".
Now the error itself isn't the focus of this. It's not being able to reproduce it. I tried running it on another box that has the same hardware specs as the offending box and it ran fine, no errors, no nothing.
I'm at an absolute loss as to why this is happening. I don't think the error is actually related to my VB code or to our databases, as it's working fine on some computers and isn't working on others. It's almost as if the code isn't propagating properly to specific boxes.
Has anybody else dealt with this before?
I feel somewhat foolish, but our Network Admin hadn't propagated Windows updates to all of our end user boxes.
The advice that Remou and mwolfe02 gave was valid and helpful, and likely would've helped had I been informed that the computers in question needed updates.
Thank you for reading and offering comments and help.

Having issues with the SSRS Reports site

So I'm working with SSRS (SQL Server 2005), which some of our applications use to generate downloads. The problem with it, though, is that the Reports website that is used to manage it seems to crash randomly. I haven't yet figured out a rhyme or reason to it - only that it will suddenly bust out with a 'Specified cast is not valid' exception and any further attempts to do anything will fail with
The item '/' cannot be found (RsItemNotFound)
Is there a place I can start looking to help me debug this issue? Are there logs that might have more in-depth information than the useless error messages I'm getting?
Is there anything in the standard event logs? You'll probably find lots of logs to go through in (C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles)...that's the default path at least.
we have a web app at where i work that occasinally, after it's been left alone for a while, has to "recompile" and will take a few seconds before it'll show a page. i've noticed that ssrs does this at times, and it might or might not be causing your problem.
you could test this by setting up an instance of ssrs on your local machine (that you know no one will get on) and running your downloads against that.
also, check and make sure no one is turning anything off or doing any backups when you are doing the downloads.