VBA date calc using If..Then..Else

  • 19 years ago

    Hey, I'm using a numeric flagging system in a database I have developed, for use in insurance industry, basically for taking on General Insurance Standards Council appointed agents.

    e.g. Data capture person is plugging data from paper application form into database, and specific answers are automatically flagged between 1 and 5, 1 being good 5 being bad, for an overall risk rating.

    However, one question poses a problem, as am unsure how to achieve end goal.

    Question is, "When was your business established", and if the response (in short date format) is less than 12 months before present date, then I want to flag as a 3 out of 5, i.e. moderate risk. Can anyone help with specific code or anything else, have been trying to use If..Then..Else statement on AfterUpdate in VBA, but no luck

  • 19 years ago

    Use DateDiff() function to get the days, months or years between two dates

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”