Would you be content to color-code something differently on the first row of
each new "group"? You could do that with Conditional Formatting.
This code gives you access to the value in the previous row, so you can
determine if it is the same as the current row or not. The expression for
conditional formatting would be:
[MyField] <> GetPreviousValue([Form], "MyField")
Haven't tested it.
Function GetPreviousValue(frm As Form, strField As String) As Variant
On Error GoTo Err_Handler
'Purpose: Return the value from the previous row of the form.
Dim rs As DAO.Recordset
Set rs = frm.RecordsetClone
rs.Bookmark = frm.Bookmark
rs.MovePrevious
GetPreviousValue = rs(strField)
Set rs = Nothing
Exit_Handler:
Exit Function
Err_Handler:
If Err.Number <> 3021& Then 'No current record
Debug.Print Err.Number, Err.Description
End If
GetPreviousValue = Null
Resume Exit_Handler
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:4B****************@newsread3.news.atl.earthli nk.net...
Does anyone have a technique for grouping in a form like grouping in a
report and still be able to enter data in the form?
Thanks for all responses,
Steve
PC Datasheet