473,385 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IIf function to return an error message

62 32bit
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
2 4338
Luuk
1,047 Expert 1GB
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
9,735 Expert Mod 8TB
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

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

Similar topics

4
by: octavio | last post by:
Hello members of the comp.lang.c newsgroup. Please I need you help on the following one. Compiling the simple code I'm getting this error message. Why ? Please what's the correct type of the fb...
3
by: Xerxes | last post by:
Hi, I have a script that is supposed to check if one of the radio buttons in a form is checked and either display an "alert" or go to another page. <html> <head> <title></title> </head>...
0
by: serge calderara | last post by:
Dear all, I need to define a web method to be executed according to user authentification. For that I am using SoapHeader class Then when my client application request the execution of web...
7
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. I'm...
7
by: teddarr | last post by:
I have an assignment I've been working on for a few days now. I need some help with the last detail. The program is supposed to create 5 objects with varying floating-point parameter lists. The...
8
by: Joshua Moore | last post by:
/* Hi, I was hoping someone could help me with this problem. I did my work and worked my way through the usual compiler messages, but I have run against some problem I can't identify. The compiler...
4
by: Jerry West | last post by:
I am new to VB .NET moving from VB6. I wrote the following code and as a result I received an error concerning it from the IDE. I don't understand why I get the message or why that what I am doing...
4
by: vozzek | last post by:
(bad joke, I know) Alright, I'm an almost total java rookie, so please don't laugh (a snicker or chuckle would be okay I guess...) I've got a form (newloginform) with an E-mail field...
4
by: barcaroller | last post by:
I am trying to adopt a model for calling functions and checking their return values. I'm following Scott Meyer's recommendation of not over-using exceptions because of their potential overhead. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.