By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Grouping In A Form

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 15 Jan 2004 04:23:28 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:

Not entirely sure what you're looking for. Perhaps a datasheet /
subdatasheet would do? Kind of like putting your company name to work
:-)

-Tom.

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


Nov 12 '05 #2

P: n/a
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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.