Formula Error

bwlytkr

Board Regular
Joined
Jun 8, 2012
Messages
185
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Can someone help with an error I keep getting when I run my access query. I keep getting this error in the cells when I run my query. Below is the formula for the column and the results. Any help would be appreciated. Thanks

Potential Pull Pole Fee Charges: IIF([Potential Late Fees]="YES" And [Potential Pull Pole Fees]>1 And [DaysAged]>=60 ,"YES")


Potential Late FeesPotential Pull Pole FeesPotential Pull Pole Fee ChargesDaysAged
yes$286.76#Error177
yes$286.76#Error4883
yes$286.76#Error3804
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Maybe the query attempts to write the result to a field that will not accept Null (you didn't say what type of query this is) because your expression has no "value if False" part at the end. In that case any calculation that results in False returns Null as a result (or is it an empty string, I forget).
That's probably not it, but it's my first guess.
 
Upvote 0
Another possibility is that the “potential late fees” field is a true/false field instead of a text field. In that case you would have to remove the quotation marks from your formula.
 
Upvote 0
Another possibility is that the “potential late fees” field is a true/false field instead of a text field. In that case you would have to remove the quotation marks from your formula.
I think you nailed it. I'd suggest reviewing naming of Access objects (not only are they too long, the field names are full of spaces). Then there is DaysAged - looks like storing calculations, which is usually a no-no. Tomorrow, the value is out of date.

See also Microsoft Access tips: Problem names and reserved words in Access
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top