Conditional Formating Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that I would like to do conditional formating on. its in a
datasheet view. the columns are as follows
EmpID, Complition Date, Duration
sometimes an employee might appear more than once, and I would like to
format it so that if that employee appears more than once, the color changes
to lets say green......
 
set up a field in you subform, that counts the amount of entries for each
employee. So create a new field and set its control source to something like:
DCount("*","YourTableName","[Employee] = '" & Me.Employee "'")
call this field somthing like: employeecount
then set a condition that says [employee]>1.

HTH

Rico
 
Sorry jom, couple of mistakes:

should be: DCount("*","YourTableName","[Employee] = '" & Me.Employee & "'")

and

[employeecount]>1
 
Thanks for the reply however, its not working my control source looks like this
=DCount("*","[qryClsTracking]","[EmplID]='" & [me].[emplID] & "'")



rico said:
Sorry jom, couple of mistakes:

should be: DCount("*","YourTableName","[Employee] = '" & Me.Employee & "'")

and

[employeecount]>1


JOM said:
I have a subform that I would like to do conditional formating on. its in a
datasheet view. the columns are as follows
EmpID, Complition Date, Duration
sometimes an employee might appear more than once, and I would like to
format it so that if that employee appears more than once, the color changes
to lets say green......
 
I answered my question and it worked as follows:
=DCount("*","[qryClsTracking]","[EmplID]= " & [emplID] & " and [CourseID] ="
& [CourseID])


JOM said:
Thanks for the reply however, its not working my control source looks like this
=DCount("*","[qryClsTracking]","[EmplID]='" & [me].[emplID] & "'")



rico said:
Sorry jom, couple of mistakes:

should be: DCount("*","YourTableName","[Employee] = '" & Me.Employee & "'")

and

[employeecount]>1


JOM said:
I have a subform that I would like to do conditional formating on. its in a
datasheet view. the columns are as follows
EmpID, Complition Date, Duration
sometimes an employee might appear more than once, and I would like to
format it so that if that employee appears more than once, the color changes
to lets say green......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top