By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

IIf function to return an error message

P: 59
My apologies in advance for the length of message.

I have a subform called Payment which stores the info of tenantsí rents due. At the moment I have the Frequency field as a dropdown box showing payments being Monthly, Quarterly or Weekly. In the NextDue field I have an IIf statement which, depending on the option chosen from the Frequency field returns the RentPerFrequency amount of rent for that period. The NextDue field is the date when next the rent falls due.

What I would like to do, if possible, is for the NextDue field to show an error if the correct next due date is not stored. I believe I would therefore need to store somewhere the dates for the different quarter days of when the rent falls due as I cannot use the current Frequency field because English quarter days and Scottish Quarters days are different dates (even though they are quarterly).

English quarter days fall on 25 March, 24 June, 29 September and 25 December. What would be helpful is an IIf statement in the NextDue field to show an error if an incorrect next due date is not inserted (ie if the English Quarter Day is selected then the date should be either 25 March, 24 June, 29 September or 25 December) and the same for Scottish Quarter days which are 28 February, May, August and November.

I understand I am asking a lot however I have been racking my brain and inserting and deleting tables and trying IIf statements until my brain has frazzled!
Jan 11 '17 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,035
I think the question is posted in the wromg place, this seems to be about Windows your question is about. mu guess, MS-Access ?

If it's only possible to select from 4 different dates, than an end-user should not be able to enter a date, but given the choice to select from 1 of those 4 dates (from a drop-down)
Jan 6 '18 #2

Frinavale
Expert Mod 5K+
P: 9,731
It would be helpful if you mentioned what technology you used to implement your application so that we can make sure the appropriate experts can see your question.

What are you using? Access? Java? C/C++? C#/VB.NET?
Jan 10 '18 #3

Post your reply

Sign in to post your reply or Sign up for a free account.