Paul Cooke
Registered User.
- Local time
- Today, 09:39
- Joined
- Oct 12, 2001
- Messages
- 288
Hi all, the following is a request for some code please - I don't like asking striaght out for code but what I need it for is critical to a person's medical records and I don't want to mess it up and to be honest I don't have a clue where to start!
I have a Subform set as Continuous which records a patient's vaccination history.
The Subform has the following controls
1.cboVaccineProdID (fk from VacccinePrdTbl using a Select Qry as the source)
2.cboRoute (a value list)
3.txtDateGiven (simple date control)
4.cboDoseNumber (a value list)
5.txtExpiryDate (simple date control)
6.txtBoosterRequired (simple date control)
7.txtBoosterExpiry (simple date control)
What I need is code to calculate some dates based on the product code that is chosen.
So for example if cboVaccineProdID = HAVR001 and cboDoseNumber = 1 and txtDateGiven = 01/01/10
then
txtExpiryDate = 12 months later
txtBoosterRequired = 6 months later
txtBoosterExpiry = 12 months later
For explanation the reasoning behind this is the HAVR001 vaccine first dose lasts for 1 year, a booster is required 6 months after the first dose is given, if thay don't have a booster after 12 months from the first dose given they have to start the course of vaccines again.
I have quiet a few of these to code all with different time 'sets' but would assume it would be a simple case of just changing the 'variables' in the 'base code' so to speak?
I really would be grateful for help on this as I said I can not afford to get it wrong.
Thank you vey much.
I have a Subform set as Continuous which records a patient's vaccination history.
The Subform has the following controls
1.cboVaccineProdID (fk from VacccinePrdTbl using a Select Qry as the source)
2.cboRoute (a value list)
3.txtDateGiven (simple date control)
4.cboDoseNumber (a value list)
5.txtExpiryDate (simple date control)
6.txtBoosterRequired (simple date control)
7.txtBoosterExpiry (simple date control)
What I need is code to calculate some dates based on the product code that is chosen.
So for example if cboVaccineProdID = HAVR001 and cboDoseNumber = 1 and txtDateGiven = 01/01/10
then
txtExpiryDate = 12 months later
txtBoosterRequired = 6 months later
txtBoosterExpiry = 12 months later
For explanation the reasoning behind this is the HAVR001 vaccine first dose lasts for 1 year, a booster is required 6 months after the first dose is given, if thay don't have a booster after 12 months from the first dose given they have to start the course of vaccines again.
I have quiet a few of these to code all with different time 'sets' but would assume it would be a simple case of just changing the 'variables' in the 'base code' so to speak?
I really would be grateful for help on this as I said I can not afford to get it wrong.
Thank you vey much.