Show dates only if they are before the [End Date]

oni1983

New Member
Joined
Jul 9, 2015
Messages
25
Hi all

I am scheduling a number of monitoring visits needed to be carried out and worked around this with the DateAdd function. However I now want the dates created to show only if they are before the dates in the column [End Date] and return a blank cell if the date generated is after the dates in the column [End Date].

How can this be done?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the Board!

I don't think that 123rickfear noticed that this is an Access question, and not an Excel one (he have you an Excel solution), but the logic is would be similar (though Access uses IIF instead of IF), i.e.
IIF(DateCalculation<[End Date],DateCalculation,"")
 
Upvote 0
thanks to both for your help...however when i inputted the logic it is now asking me for the parameters.
 
Upvote 0
when i inputted the logic it is now asking me for the parameters.
That usually means that you have typed in a field name between square brackets that it does not recognize (that you have made a typo).
Make sure that your field names between brackets exactly match your actual field names.
 
Upvote 0
the column [End Date] and return a blank cell if the date generated is after the dates in the column [End Date].

The column of what? This sound like a parameter query that you are opening in code. Or it could be a report or a form based on such a query. Or calculated controls in a form/report, although I doubt those would produce the error you seem to be getting. Or calculated field in a query. Perhaps you can now see why you need to supply more info related what I'm saying, including the type of query if that's what it is. I suspect it's not an issue of brackets because you included them in your original post.
 
Upvote 0
I am trying to create a simple query to automatically create dates at 4 week intervals so that we monitor a number of trainees who have been placed in employment. Thus I added the information needed about trainees and their employers from the relevant tables (working fine till now) and then generated the dates by creating columns in the query and adding the function DateAdd('ww',2,[Start Date]) (again till here everything ok)...now I want Access to show as blanks any dates generated after the end of the placement period which is listed in a column entitled [End Date].

I tried working with IFF as suggested but the query is asking me for parameters. I do not want this as I want all the information to be generated in a report automatically without the need for users to input any parameters.

I hope I provided all the information needed, if not, please let me know!
 
Upvote 0
Problem Solved!!! Everything is working fine now
So what was the issue?
Was it a typo or something else?
 
Upvote 0

Forum statistics

Threads
1,221,848
Messages
6,162,415
Members
451,762
Latest member
Brainsanquine

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