K
Kamil
Hi.
I created a form with subdatasheet:
FORM - employee data
SUBDATASHEET - employee's history of employment (multiple records from
another table)
On the subdatasheet (I mean the object in forms section, not the
embedded subdatasheet) I created few fields in the footer section,
which are summarizing the employment period and calculating if an
employee is employed or not.
I wanted to have these values on the main form, so I placed the
unbound text fields and used formulas.
It works nice, but shows me correct values after half a second.
It wouldn't be a problem, but I want to indicate the status with
color: EMPLOYED in green and UNEMPLOYED in red.
Here's the code I used:
Private Sub Form_Current()
if Me!status="EMPLOYED" then
Me!status.forecolor=4227072
else
Me!status.forecolor=255
end if
end sub
the coloring does not work. I suppose that's because of the delay.
what can I do to make it work?
Best regards,
Kamil
I created a form with subdatasheet:
FORM - employee data
SUBDATASHEET - employee's history of employment (multiple records from
another table)
On the subdatasheet (I mean the object in forms section, not the
embedded subdatasheet) I created few fields in the footer section,
which are summarizing the employment period and calculating if an
employee is employed or not.
I wanted to have these values on the main form, so I placed the
unbound text fields and used formulas.
It works nice, but shows me correct values after half a second.
It wouldn't be a problem, but I want to indicate the status with
color: EMPLOYED in green and UNEMPLOYED in red.
Here's the code I used:
Private Sub Form_Current()
if Me!status="EMPLOYED" then
Me!status.forecolor=4227072
else
Me!status.forecolor=255
end if
end sub
the coloring does not work. I suppose that's because of the delay.
what can I do to make it work?
Best regards,
Kamil