I have finally tacked the Crosstab Query monster (well, made a crosstab query work anyway) and have created a report (from a number of crosstab queries combined into a single query - then generate report from that query). In this report I have a field called Auth and a field called Hired. We have so many job positions Authorized and I needed to know how many were filled. I did that fine.
I now have a report that shows how many of each job position are authorized and how many are filled. I have code set up in the On Format event of my report detail section to color the text red in the Auth field, if the Hired field is of less value. Works GREAT except when we have Authorized positions with no one in them.
By setting the format of the hired field to #;#;0;0 I have gotten zeros to show up...I just can't figure out how to turn the Auth text red since there doesn't appear to be anything in the hired field. I have tried
If me.hired = "" then
me.auth.forecolor = vbRed
else
me.auth.forecolor = vbBlack
End If
Doesn't work. Any suggestions?
Ellie
**Using Access 97 at work**
**Using Access 2000 at home**
lena.wood@starband.net
I now have a report that shows how many of each job position are authorized and how many are filled. I have code set up in the On Format event of my report detail section to color the text red in the Auth field, if the Hired field is of less value. Works GREAT except when we have Authorized positions with no one in them.
By setting the format of the hired field to #;#;0;0 I have gotten zeros to show up...I just can't figure out how to turn the Auth text red since there doesn't appear to be anything in the hired field. I have tried
If me.hired = "" then
me.auth.forecolor = vbRed
else
me.auth.forecolor = vbBlack
End If
Doesn't work. Any suggestions?
Ellie
**Using Access 97 at work**
**Using Access 2000 at home**
lena.wood@starband.net