ACCESS formula problems

Leadparsons

New Member
Joined
Mar 11, 2015
Messages
44
Hi All,

I have and excel formula that i'm trying to convert to access. In excel I have two date columns and the formula will always enters the later of the two dates. If there is a date missing in either it will not display a date. the formula im using is: =IF(K160="","",IF(L160="","",MAX(K160,L160)))

How do I convert this to access calculated expression ?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this:
Code:
MaxDate: IIf(IsNull([DateField1]) Or IsNull([DateField2]),"",IIF([DateField1]>[DateField2],[DateField1],[DateField2]))
 
Upvote 0
Comes up with an error - The expression you entered has an invalid. (dot) or ! operator or invalid parentheses. You may have entered an invalid identifier or typed parentheses following the Null constant.

The code im using is MaxDate: IIf(IsNull([LOI Received]) Or IsNull([ECR3 Date]),"",IIF([LOI Received] >[ECR3 Date],[LOI Received],[ECR3 Date]))
 
Upvote 0
Tried taking out the words Max Date: and now comes up with the error The expression could not be saved because its result type, such as binary or NULL, is not supported by the server.
 
Upvote 0
Where exactly are you trying to place this formula in Access?
 
Upvote 0
Access doesn't have sheets. The calculation should be in a Calculated Field in a Query, or the Control Source of a Text Box on a Form.
 
Upvote 0
I assume that you must be using a new version of Access, which allows for calculations on the Table level. Though that is now possible, it really isn't a good practice to get into (as no other database program allows that). Calculations are best done in queries. See: Access Tips: Calculating in Queries
 
Upvote 0

Forum statistics

Threads
1,221,899
Messages
6,162,686
Members
451,782
Latest member
LizN

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