Solved Expiry date for many certificates (1 Viewer)

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
Hi,

I have a continuous form that displays records for a selected certificate based on a combo box of a parameter form.
For each certificate selected i want to display the expiry date for each persons certificate on the continuous form.
Is this possible?

Many thanks in advance
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:41
Joined
May 7, 2009
Messages
19,230
create a query that will display the Person name, certificate, certification date, (certification date + duration of certificate) as expiry date.
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
Hi, thank you for replying. I was trying to display it in the list of people who have this certificate but problem is that each persons date is different?
I was trying to find a way to do it in vba but it displays the same date for everyone
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:41
Joined
Feb 28, 2001
Messages
27,158
The problem is usually in the way you gather or compute the data. You need a query that picks up the person and either picks up or computes the expiration date from that information. THEN use that query as the basis for your display. Do not refer to the table.
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
Yes its a tricky one for me as i have an intermediate table to create a many to many link as employees may have many certificates each with a different expiry date
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:41
Joined
Sep 21, 2011
Messages
14,256
Yes its a tricky one for me as i have an intermediate table to create a many to many link as employees may have many certificates each with a different expiry date
So would not the issue date of the certificate be stored in those records?
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
So would not the issue date of the certificate be stored in those records?
yes it is. I'm going to try and see if i can add code to add each persons certificates expiry date
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:41
Joined
Oct 29, 2018
Messages
21,467
yes it is. I'm going to try and see if i can add code to add each persons certificates expiry date
How do you know when each certificate expires? If a certificate was issued today, when does it expire?
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
I'm trying something like this:

If Me.CertName.Value = "CSCS Gold" Then Me.ExpiryDate.Value =DateAdd("y",+1095,[Effective Date])
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 06:41
Joined
Oct 29, 2018
Messages
21,467
Each type of Certificate is valid for so many years. Some 2, some 5 etc.
And how do you keep track of that information? Do you have a lookup table for that data?
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
And how do you keep track of that information? Do you have a lookup table for that data?
At the moment i only store the effective date but i have now created an expiry date field to try and get it working i used the above code in the After Update of the EffectiveDate Text box but the ExpiryDate Text box remains blank at the moment?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:41
Joined
Oct 29, 2018
Messages
21,467
At the moment i only store the effective date but i have now created an expiry date field...
I don't think that's a good idea. Queries are the workhorse of database applications. As @arnelgp was trying to tell you earlier, you only need to create a calculated column in a query to display the expiry dates. The missing information was how do you calculate the expiration date for each certificate type. If you have the type and duration in another table, you simply join that table to your issued certificate table to calculate the expiry dates.
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:41
Joined
Sep 21, 2011
Messages
14,256
I would have thought the certificate duration would be with the certificate record?
How on earth can Me.EffectiveDate.Value be = "CSCS Gold ?
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
I would have thought the certificate duration would be with the certificate record?
How on earth can Me.EffectiveDate.Value be = "CSCS Gold ?
Ah that was a mistake should be If Me.CertName.Value = "CSCS Gold"
 

Sam Summers

Registered User.
Local time
Today, 14:41
Joined
Sep 17, 2001
Messages
939
I don't think that's a good idea. Queries are the workhorse of database applications. As @arnelgp was trying to tell you earlier, you only need to create a calculated column in a query to display the expiry dates. The missing information was how do you calculate the expiration date for each certificate type. If you have the type and duration in another table, you simply join that table to your issued certificate table to calculate the expiry dates.
Thank you everybody for your input and help - amazing!
Another forum member has just helped me solve it and put me in the right direction
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:41
Joined
Sep 21, 2011
Messages
14,256
Thank you everybody for your input and help - amazing!
Another forum member has just helped me solve it and put me in the right direction
Well. do come back and post your solution please, as you never know when someone else has the same requirements.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:41
Joined
Oct 29, 2018
Messages
21,467
Thank you everybody for your input and help - amazing!
Another forum member has just helped me solve it and put me in the right direction
Good luck with your project.
 

Users who are viewing this thread

Top Bottom