Hi. I'm struggling with how to set the value of my PatientName field based on the patient's referral date (ReferralDate). Both fields are on frmPatientRecordbyLName and I'm sure I'll need to use VBA code since I'll need to set the color to one of five colors and Access2000 is limited to 3 conditions in the Access-defined contols.
I want it to be broken down like this:
If the ReferralDate is between 01/01/2004 and 12/31/2004, then the PatientName field should have the background color set to 15647229.
01/01/2005 - 12/31/2005 - back color 10670331
01/01/2006 - 12/31/2006 - back color 9826295
01/01/2007 - 12/31/2007 - back color 10747051
01/01/2008 - 12/31/2008 - back color 16506532
Could someone help me with the code? And on what event should I put it? When I was searching for similar questions I saw all sorts of references to On_Format events, but that's for reports and my question is for a form.
Thanks in advance for any guidance you can give!
Kate
I want it to be broken down like this:
If the ReferralDate is between 01/01/2004 and 12/31/2004, then the PatientName field should have the background color set to 15647229.
01/01/2005 - 12/31/2005 - back color 10670331
01/01/2006 - 12/31/2006 - back color 9826295
01/01/2007 - 12/31/2007 - back color 10747051
01/01/2008 - 12/31/2008 - back color 16506532
Could someone help me with the code? And on what event should I put it? When I was searching for similar questions I saw all sorts of references to On_Format events, but that's for reports and my question is for a form.
Thanks in advance for any guidance you can give!
Kate