bearcub
Well-known Member
- Joined
- May 18, 2005
- Messages
- 734
- Office Version
- 365
- 2013
- 2010
- 2007
- Platform
- Windows
I have a report that is based upon a query where I'm getting the dreaded #Type ! error. All the query in the report shows up as it should but when I go to the report (which is comprised of 3 fields in the detail) I get this error in two of them.
In the header row, I have State Council Positions (like Minority at Large, Director at Large, etc). The people and their work offices are populated in the detail area below this
In the detail area, I include the name of the State Council member and their Alternate (if there is one). The query has a State Council Alternate field which either has True or False in each record. so the following two formulas are dependent upon the State Council Alternate field. In my query, the appear on the right side of the field, doe this mean that they are numeric (e.g. binary, not TRUE or False text)?
When I run each item field separate without the IIF statement, I get the expected results for each member. When I put the formula back together I get the #Type ! error.
This is the first formula in the first field (the first column with the #Type ! error.
This is saying that is a State council is not an "Alternate" (the State Council Alternate field in the source query is false) then add the members first and last name (the [Individual] field) in the formula into the report. Otherwise, if the State Council Alternate field (in the query) is true include " Alternate:" in the row instead.
So we would have something that looks like this:
Joe Blow (his State Council Alternate field in his record is false)
Alternate: (This is for the member whose State Council Alternate field is true).
The second formula I have is the following:
This one is saying if the State Council Alternate Field is False then enter the Individual's last name. Otherwise, include the office that they work out of the [Local Name] field.
So, Joe Blow and the Alternate would look like this:
The "IIf([Local Name]=[State Council Positions],Null," applies to situations where the position name is same as the local name. We have some instances where a member will represent an office and the state council position would be one of the same. if this is the case, no need to enter anything here.
I do have this DB linked to an Excel file which I think might be causing the issue.
In the original table (before I linked it to Excel), the State Council Alternate field was a check box. In my Excel file, it is shown as either True or False.
Could this True or False in my spreadsheet be coming over into Access as a numeric field instead of a text field, thus creating the #Type !?
This is the only thing that I could think about that could cause an error. when I built the report initially from a local table (with check boxes being used) it worked fine. Now, I'm having issues with it and I don't know where to start to debug it.
Thank you in advance for your help,
Michael
In the header row, I have State Council Positions (like Minority at Large, Director at Large, etc). The people and their work offices are populated in the detail area below this
In the detail area, I include the name of the State Council member and their Alternate (if there is one). The query has a State Council Alternate field which either has True or False in each record. so the following two formulas are dependent upon the State Council Alternate field. In my query, the appear on the right side of the field, doe this mean that they are numeric (e.g. binary, not TRUE or False text)?
When I run each item field separate without the IIF statement, I get the expected results for each member. When I put the formula back together I get the #Type ! error.
This is the first formula in the first field (the first column with the #Type ! error.
Code:
=IIf([State Council Alternate]=False,[Individual]," Alternate:")
So we would have something that looks like this:
Joe Blow (his State Council Alternate field in his record is false)
Alternate: (This is for the member whose State Council Alternate field is true).
The second formula I have is the following:
Code:
=IIf([State Council Alternate]=False,IIf([Local Name]=[State Council Positions],Null,[Local Name]),[Individual])
This one is saying if the State Council Alternate Field is False then enter the Individual's last name. Otherwise, include the office that they work out of the [Local Name] field.
So, Joe Blow and the Alternate would look like this:
Code:
Joe Blow San Mateo Educators Association
Alternate: Sherry Stevens
The "IIf([Local Name]=[State Council Positions],Null," applies to situations where the position name is same as the local name. We have some instances where a member will represent an office and the state council position would be one of the same. if this is the case, no need to enter anything here.
I do have this DB linked to an Excel file which I think might be causing the issue.
In the original table (before I linked it to Excel), the State Council Alternate field was a check box. In my Excel file, it is shown as either True or False.
Could this True or False in my spreadsheet be coming over into Access as a numeric field instead of a text field, thus creating the #Type !?
This is the only thing that I could think about that could cause an error. when I built the report initially from a local table (with check boxes being used) it worked fine. Now, I'm having issues with it and I don't know where to start to debug it.
Thank you in advance for your help,
Michael