I have created an access database which is used to create reports by various people. The database simply links to various external data sources. Via macros, it runs queries, creates reports and pushes them to a SharePoint site. The macro is triggered by a button. It runs fine for me. No errors and works perfectly. For another user in my department it doesn't work. She gets the following error:
Undefined function 'Format' in expression
I looked and the macro fails on an update query that runs. See the below screenshot.
It doesn't like the "Format" portion of the expression, but only on her PC. It works fine on mine. I don't use 'Format" for any other object in my database so I'm not sure why it would error out. I use the Format function all the time to format date values.
Any idea why this is selectively erroring out on one PC?
Problem: There is Reference List in VBA. Once you open (VBA environment-> Tools-> Reference), you will find a Checked mark in front of “MISSING”.
Solution: Uncheck that check Box which says “MISSING”, and save it.
Result: It will work
Same problem but in Access 2016, I didn't have any references reported as 'Missing' but I found adding in the following reference made it work:
C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
Related
I'm using a database based on the MS-Access Assets Database template. (You can download it here: https://support.microsoft.com/en-us/office/use-the-access-asset-tracking-template-6e99a32c-fbda-48a2-89b0-ef0d68b381ec.
I've added a few tables of my own and some VBA code.
On the "Asset Details" form, I can make a change to the current record, then press the "Save and New" button. It runs the embedded macro cmdSaveAndNew, which you can see here:
I have not modified this macro. But it gives me this error message:
The Microsoft Access database engine cannot find the input table or query 't Asset Log'. Make sure it exists and that its name is spelled correctly
So you know, t Asset Log is the old name of one of the tables that I added to the database. I cannot figure out why the embedded macro is trying to access it. (In the current version of the database, it's tAssetLog with no spaces. I've searched through my VBA code, and it only uses the current spacing.)
I tried the macro in "Single-step" mode. As near as I can tell, the error occurs at the SaveRecord line.
I've looked at the properties of all the controls, and I don't see any Data or Events that point to t Asset Log. I've run "Compact and Repair" on the database, and also compiled the code in the VBA editor; they didn't help.
open the queries involved with this macro and sanity check that 't Asset Log' is not being used as criteria or in a calculated field...
if you don't see it there, wouldn't hurt to search in VBA for 't Asset Log' - is easily done with the Find feature...but doesn't seem like is here though not sure what the macro does....
I have a SSRS 2008 project with some reports, and recently we update the version, now I open the project with the SQL Server Data Tools 2015, and all is fine, I can deploy, edit, update all fine.
The problem comes when I want to create a new report, when I add a DataSet to the report, the preview tab says:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
and nothing more happens, I can't preview the report anymore.
Does anyone know if it is a issue of upgrade/open a SSRS 2008 solution with SSDT 2015?
After some research... I couldn't find anything.
So I tried to create the report in Reporting Services 2008, and when trying to preview the report after adding a DataSet it show me the same error:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
But now, it has an aditional line:
The shared dataset definition is not valid. details the required
attribute 'name' is missing
And after enter the first search result in Google, it looks like the problem was that my DataSet was a Shared DataSet, JoannaK found the same problem and also found a workaround:
Found a workaround for now: Create the data set as embedded> Convert
to Shared Data set Looks like the Name property is set when you start
with embedded. report runs and can data sets can be uploaded to the
report server
This solves my problem. Hope it helps someone in the future.
Source: JoannaK from SQL Server Data Tools Preview update for April 2016
SSDT is generating a broken dataset definition. To fix it:
Open up the shared dataset's .rsd file in a text editor.
In the xml therein find the <DataSet> opening tag.
Add the attribute Name (case-sensitive) to that tag, e.g: <DataSet Name="SomeDataSet">
Probably should set the Name to be the same as the filename but doesn't seem to make any difference as far as I can see.
Thanks to the existing answer as without that I never would have got it to work at all.
VS2015 / SSRS2012
I experienced similar error. It mostly occurs as of change in 'SHARED DATASET'.
Check for query fields in 'Shared Database Properties', if no fields are there , simply add fields you have included in your query.
Check for database connection
Check for 'Stored Procedure' and it's result if you have used stored procedure.
One can delete old dataset and re-create with same name.
As a last option, one can create 'New Dataset' (another one) and bind the new one with the report(take care to map all fields again once you choose to create new dataset.
I have changed the SSRS report names in my reporting server projects. I have four reports and four linked reports in this projects. The linked reports are being called by an action setup on a column value where the parameters are being passed to the linked reports. After renaming all the report names I have made similar changes in the Action property in order direct the parameters to the changed report name. I have also saved the changes and re-built the project and have not got any errors. All the four main reports are working fine but the linked reports are trowing the following error while running the reports using preview options in MS Visual Studio 2010
An error occurred during local report processing. Object reference not set to an instance of an object.
I have deployed this to my local report server and on browser I getting the following error
The item '/Unit Reports/OLDREPORTNAME' cannot be found. (rsItemNotFound)
Here you can see that it is still trying to locate it to the old report name not the new changed one.
I have clean, built and deployed the project several times but still getting these errors
Please let me know if I need to make changes in any other files to avoid this error.
Thanks
Within the .rdl search for "OLDREPORTNAME" and replace with "NEWREPORTNAME"...
Take a backup first :-)
I have noticed that when I implement the Action property on the report field, it automatically set-up the same Action property of that text box where the field was defined.
I have found that the text box Action property was still pointing to the old report. I have changed text box Action property to point it to the new report and now my linked reports are working absolutely fine.
Thanks
Yogesh
I have taken 2 sample databases from online - one for a calendar and one for drag and drop functions - and pulled some code together for a result that is ALMOST functioning as I had hoped.
There is a function to build/refresh the calendar, which works perfectly.
The drag and drop functions work perfectly. (The item is updated in the table to reflect the new date.)
When I drag and drop, the calendar doesn't automatically refresh. If I click next month then last month (which call the refresh function with a new date), the changes are reflected as expected.
The problem is when I try to automatically call the refresh function after a drag/drop event. Access crashes every time I call for a refresh in the code after drag/drop, regardless of where I put the call.
The error says:
Microsoft visual C++ Runtime Library
Runtime Error!
Program: C:...
This application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information.
I have tried:
I thought it might be trying to refresh too fast, so I added a pause
function and had the program wait 10 seconds after dropping before
refreshing. Still crashed.
I did a compact and repair on the database.
I ran /decompile from the command-line on my accdb file.
I exported the relevant form, tables, query and module to a new accdb
file.
I have tried to re-register the libraries checked under references.
(RegSvr32 "Path to library file") The only one that succeeded was
vbe7.dll. The "MS access 14.0 object library", "OLE automation", and
"MS Office 14.0 Access Database Engine Object" don't contain a
DllRegisterServer method, so regsvr32 did not succeed with those. There are no other
references checked. Still crashes.
I have tried countless places to insert the call to refreshcalendar()
I have stepped through the code and verified the exact place that the
crash happens. It is commented in the code.
Here is a link to the database.
To reproduce the problem:
Open frmsubCalendar.
There are 2 entries in May 2014 that can be dropped to other days on the calendar. I can then click the prev/next month buttons on the form, and when May reloads, the change has been made. But if I go into mod_drag_drop under the sub dropdetect() and uncomment the lines noted in the comments, the refresh will crash access at the end of the dropdetect() sub.
I cannot figure out how to make the calendar refresh automatically after a drag/drop event without access crapping the bed.
I realize this is a bit outdated, but I had a similar issue and didn't see this one being answered, I figured I'd add this answer for posterity. :) I discovered it was caused by a reference to a function by the form name. I had the following call in a module:
lContractCt = Form_Census.lContractCt_f(bIsMembers)
Where lContract is a Long, there is a form named Census and a public function in that form called lContractCt_f.
I moved the function to a module (so the Form_Census reference wasn't necessary any more). And changed the call to:
lContractCt = lContractCt_f(bIsMembers)
This fixed the error. So, I would check if you have any public function references going from a module to a form and move those public functions into a module. I also saw a similar thread with a different form reference, via Forms![Census], for example.
Is there a compiler option in ms-access (2003) that requires all vba code to compile before allowing any code to run? I'd like to be able to turn it off. I've tried the unchecking the 'Require Variable Declaration' and 'Auto Syntax Check' options, but no result.
Background information
I've just been given an ms-access database that runs fine on their machine but will not run on my machine. I get this error message on startup:
"The expression On Open you entered as the event property setting produced the following error: Method or data member not found"
This is caused by vba compilation errors in what looks like redundant code. Interestingly the code doesn't compile on either machine, but on their machine it database is usable on my machine it isn't! I assume its something simple like a compiler option, except I can't find it!
(Before anyone mentions it I know that the real solution to the problem is to fix/remove the bad code)
Code will run in MS Access without all code compiling, however, On Open is a form property that runs code when the form is opened, so the code in that event will be compiled and run when the form opens. I have encountered this error before when a version of Access is run on a PC that has two versions installed (specifically, <2007 and >=2007). For me, the solution was to choose Repair from the Help menu.
Access has a /decompile command line switch. See the accepted answer to this StackOverflow question.