#NAME in Access report expression - ms-access

I have an Access 2007 report which has a table as a data source. I have a few columns of data that directly pull data from the table in a summarized way (using report groups) and the last column is the total of the first 6 columns. Simple enough.
Now the expression that calculates the sum of those 6 columns sometimes returns #NAME? and sometimes does not. I have more than triple-checked for any error, typo, whatever.
There is no space in front of my expression;
The expression does start with an =;
The references to columns in the table are all valid;
No control has a name even remotely similar to any column in the source table;
I have tried generating the expression using the expression builder;
There is no conditional formatting tied to any control;
There is no VBA code used at all in generating the report.
Also, sometimes if I copy the one of the boxes with #NAME?, delete it and paste it back then all the #NAME? errors disappear. Then I save and reopen the report and the errors are back.
I'm out of ideas for this. I can't post screenshots or distribute the file due to its nature.
Thanks !

I had similar problems...The solution was that I have used unicode characters in Names. For example a Text Box with the control source "dataščž" had the Name "datačšž". This was working in previous versions of Access, but not anymore. Changing the Name "datacsz" solved the problem.

Related

MS Access setting RecordSource results in error

I like to use an unbound subform to display the result of an crosstab query. However following code
Me.subFormForecastSummary.Form.RecordSource = "SELECT ....."
results in this error message: "The expression you entered refers to an object that is closed or doesn't exist".
When I use the Source Object in the form designer and specify the select statement, then the code above works fine and I am able to set the property RecordSource.
The issue I am facing is that the select statement is based on a crosstab query and can contain a different number of columns (in my case weeks) depending on the master record. The issue I am facing is that the datasheet only displays the columns as per the original query specified in SourceObject (the data itself is refreshed though). Does anyone know how I can force the columns to be refreshed as well or how I can get overcome the error message?
Thanks
Thanks for the responses thus far. Based on the comments and further research I have decided on following solution:
Created a dummy query returning 1 record with the maximum number of columns. I have named them 001 trough to 100
Still created a subform and bound it to the dummy query
In VBA I then change the recordsource at runtime as required
Also in VBA rename the captions as required
You would think there should be a more elegant solution, but this works for me

unwanted qualifiers appearing in some of the rows when exporting to tab limited file SSRS

I am working on some SSRS reports which already were built using Crystal reports.
When I use the same SQL script in SSRS and export to tab limited text file, for some of the rows there is a symbol (") at the beginning and end of the row, but this is not coming for the all of the rows, only for some of the rows in the result set. Also my script returns single column and which is concatenated filed.
I checked the settings in my rsreportserver.config and its like
<Qualifier></Qualifier> for the tablimitted format.
I am bit confused in this case and I really appreciate if anybody can help me in this.
Thanks,
Sivajith

Data type conversion from Access to SQL Server errors

I have a SQL Server that is ODBC into my Access which is being utilized as my front end. I created a column in SQL with a BIT data type and created a checkbox with the yes/no data type that uses my SQL Column as its control source. When I go into my form and try to change anything in there and update my tables, I get a writing error and it wont let me append the updates I'm trying to make. As soon as I delete the bit data type, and the check box, then I am able to again append information to my form. Does anyone know a solution or a way I could utilize the Boolean check boxes to report to my SQL Database so that I could track progress of an order, but still be able to append my records? Also if anyone knows why this is happening I would appreciate the information just for my own notes and understanding.
this image shows the column created in SQL Server
This image shows what it looks like in the ODBC table in Access
This image shows the control source I picked which is from a query that utilizes the names of the form comboboxes, text boxes, and hopefully check boxes
This is image shows what happens after I try to update and and close
Thanks
haven't done this for a long time, but the problem could be related to the numbers that are stored. yes/no in access = -1/0, in sqlsrvr = 1/0 (or similar). you could use an INT field in sqlsrvr which will then store whatever access sends (-1 or 0), or keep the BIT but don't use yes/no in access - create a custom yes/no table where yes=1 and no=0 (or whatever BIT needs) and use the custom table as a lookup table for that field which, when updated will send the appropriate value. hope that's all relevant and makes sense.
So I have been messing around with this and after a few other problems running through SQL, Cabinet Vision (our drafting software with a ancient access database) and crystal reports I came to realize that Access cannot accept null values.
So in my SQL Bit data type column I set the default value as 0 and didn't allow nulls. now it records all my check boxes as true or false. and I no longer have a write conflict.
This most commonly arises when a db is developed in Access and at some later date the tables are exported via ODBC to SQLServer. The Checkbox controls on the Access forms were probably placed there using the 'Available Fields' button on the Access 'Design' ribbon. Before getting into complicated solutions with T-SQL modifications to metadata etc, try simply deleting the checkbox control from the problem Access form. Insert an unbound checkbox to replace it, then use the the Properties dialog to set the relevant SQLServer field as the control source for that checkbox. Usually works.

Access data type conversion

I am reworking and expanding a somewhat complex database schema that has a small number of tables and queries but they are closely related. The only problem I had with it was that in one of the tables the 2 fields that were relating to another table were using the field name of the record and not the ID of the record.
I changed the referring fields data type from text to number and entered some data. The queries and the reports work fine with 1 exception:
There is one report that uses both referring fields. One of the fields is ok but the other one shows symbols instead of numbers. ( The IDs in my sample entries were 14 and 20 and the symbols shown were a double barred music note /alt code 14/ and the symbol for an end of a paragraph /alt code 20/ ) Investigating further I have found that if I make a query that contains the query source for the report both fields display fine, but if I add another table to that query the second field once again shows symbols instead of numbers.
I have found a workaround of this by converting those fields back to text and the id fields in the other tables to text as well. This text key will probably haunt me later on, so I'd like to make it right before it is too late.
This is all access 2010 btw. The source file was already in 2010 (couldn't open in 2007 even)
Sounds like a corruption issue for sure. I would try adding a new column and run an update query to populate it with the values from the old column (maybe use cint(indexfield)), then delete the old column.
It might also be a good idea to decompile the database. This often helps resolve corruption issues.

SSRS -> Using code function to create my query dynamically, how do I get at my data (put data into table)?

I am not a seasoned SSRS veteran. I have made quite a few but they were pretty simple.
Today, I am attempting to use the Code tab of the Report Properties to perform some vb functions that will return my query in a string. I am passing in date parameter that is used to create my dynamic query.
My problem/issue is that I do not know how to pull this information into my table.
I have seen instances where a developer calls from each individual field and it calls the code to get a specific field. I was under the impression that I could somehow use a dataset to do this and have some documentation on this, but can't seem to find anything on the web regarding how to do this.
This is probably a pretty poorly written question, but does anyone know how to do this?
I was thinking in the Dataset Properties, I would code something like this in the expression field.
=Code.GetReportDetail(Parameter!InputDate.Value)
GetReportDetail being the starting function within my code window.
I am having difficulties how I can then pull that dataset into my table from that point though.
Any advice on this is greatly appreciated....Thanks.
After further review, I was creating this in VS2010 for RC0 2012 SQL Server, which I should have noted above.
All you have to do is create your report by adding new item (Report). Add your code by right clicking in the pink area and going to Report Properties and pasting your code into the code tab.
Next when you pull a table into your "add item to the report / white space" It allows you to create your dataset.
I chose use dataset embedded in my report. Datasource of OLE DB because I am doing MDX. Query Type Text then in the function I pasted this. (omitting parameters for now) :
=Code.GetReportDetail()
I then filled in fields manually because it seems that dynamic query running does not pull in fields.
I was then able to reference these manually created fields via my table detail row.