Date Programming (1 Viewer)

damo2deme

New member
Local time
Today, 07:41
Joined
Sep 8, 2022
Messages
6
Hello Everyone,

This more of a issue with my tired little brain than anything else.

I am creating an absence review meeting tracker for work. Its nearly complete and I'm just adding some additional features to make it easier for the end user.

When we issue a sanction it lasts for six months from the absence review meeting date. So on the form i have a dropdown combobox with for example "6 months warning" when this is selected i want to automatically populate a date 6 months from the date of the absence review meeting that is already populated with a date.

Also......

I want to create a report which shows which sanctions are live. So if the absence review meeting is 11/09/2022 and the sanction date was 6 months from this date 11/03/2022. I would like it to show if the date is within these 2 dates and is active. I hope everyone understands this.

Thanks for your help in advance, its only my 3rd database i have created and I've really enjoyed it and it will enhance our current processes and procedure's. Everyone has to start somewhere!!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:41
Joined
Oct 29, 2018
Messages
21,473
Hi. To calculate a date, you can use the DateAdd() function. If you can calculate it, then you probably don't need to store that value in your table.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:41
Joined
Feb 19, 2013
Messages
16,612
Always better to provide example data and the outcome required from that example data to illustrate your requirement as descriptions are frequently open to interpretation

investigate using the dateadd function (google 'vba dateadd') although it should not be necessary to store this value since it is easily calculated whenever required.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:41
Joined
Feb 28, 2001
Messages
27,186
In isolation, the other answers are absolutely spot-on. However, you imply that there would be some other types of interval in this combo. The question is whether it is possible to have more than one interval pending for the same person. That would govern HOW and WHERE you would store these dates and might in some way alter the optimum answer.
 

cheekybuddha

AWF VIP
Local time
Today, 07:41
Joined
Jul 21, 2014
Messages
2,280
Is there any reason why you are storing dates as strings?

It usually leads to a world of pain!


Apologies, must be confusing this with another thread I read recently 😬
 
Last edited:

mike60smart

Registered User.
Local time
Today, 07:41
Joined
Aug 6, 2017
Messages
1,905
Hello Everyone,

This more of a issue with my tired little brain than anything else.

I am creating an absence review meeting tracker for work. Its nearly complete and I'm just adding some additional features to make it easier for the end user.

When we issue a sanction it lasts for six months from the absence review meeting date. So on the form i have a dropdown combobox with for example "6 months warning" when this is selected i want to automatically populate a date 6 months from the date of the absence review meeting that is already populated with a date.

Also......

I want to create a report which shows which sanctions are live. So if the absence review meeting is 11/09/2022 and the sanction date was 6 months from this date 11/03/2022. I would like it to show if the date is within these 2 dates and is active. I hope everyone understands this.

Thanks for your help in advance, its only my 3rd database i have created and I've really enjoyed it and it will enhance our current processes and procedure's. Everyone has to start somewhere!!
Are you able to upload a zipped copy of the database with some sample data?
 

Users who are viewing this thread

Top Bottom