And I know how to do it in VBA but that's not the point I'm driving at. Access was mainly built for data manipulation, the presentation of data comes afterwards. A database is mainly used for data that grows downwards which is where Access comes into play, whereas data that grows and is presented horizontally (which is your case) should be handled in Excel. With the way you're going you'll end up needing Excel functions and find that you can't do the same in Access (without significant amount of coding). If this was Excel you'll simply highlight the entire row and apply your conditional format.I'm certain that the conditional formatting wizard is simply applying some sort of vba code so I suppose I'm back to my initial enquiry. How to do you create vba code to apply conditional formatting to the whole form?
In your case your goal should be to save and manipulate data in Access but you present it in Excel. Data can be easily exchanged between both platforms with the click of a button. Excel is as solid as Access if they're used for the right purposes.I can very quickly create a similar sort of Gantt chart in excel but I want to be able to apply all sorts of rules and manipulate data. In my experience the db may prove difficult to build but is very reliable for years after where as spread sheets fall down.
With [COLOR="Blue"]TextboxName[/COLOR].FormatConditions
.Delete
.Add acExpression,, "[COLOR="blue"]Enter your expression here[/COLOR]"
End With
dim ctl as Control
for each ctl in me.controls
next
ElseIf ctl.ControlType = acTextBox And IsDate(clt.Name) = True Then
Dim ctl As Control
' ctl is a control object. A control may be a textbox (acTextbox), listbox (acListbox)... etc
' Delete - delete all the conditions first
' Add - Add the conditions. Chr(34) simply wraps the word in quotes as you would when you write the condition
' Item(0) - take the newly added condition and set the formatting properties. 0 is first, 1 is second... etc
For Each ctl In Me
If ctl.ControlType = acTextBox And IsDate(ctl.Name) Then
With ctl.FormatConditions
.Delete
.Add acExpression, , "[" & ctl.Name & "] Like " & Chr(34) & "*design*" & Chr(34) & _
" Or " & _
"[" & ctl.Name & "] Like " & Chr(34) & "*assessment*" & Chr(34)
.Item(0).BackColor = vbYellow
End With
End If
Next