grouping on continuous form (1 Viewer)

SunWuKung

Registered User.
Local time
Today, 00:39
Joined
Jun 21, 2001
Messages
172
I have a list on a continuous form which goes like this:

1 adsf
1 qwer
-----------------
2 sdfg
2 rzrzur
2 gjkghjk
2 nmfhj
-----------------
3 sdfgrtwe
3 wrtwret

I would like to have a line appearing under each category. Is it possible to do?
Thanks for the help.
SWK
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:39
Joined
Feb 19, 2002
Messages
43,293
No. If you want to apply formatting to the list, use a report and set the group property to have a group footer where you can put the line.

When you have a 1-many relationship, it is better to use a form with a subform rather than a single form.
 

SunWuKung

Registered User.
Local time
Today, 00:39
Joined
Jun 21, 2001
Messages
172
Hi Pat,
I have a combo box on the form header that I use for filtering - which I guess is a similar setting to a form-subform.

So I can have a look at the different groups separately its just I would like to have some formatting when the filter is not applied. The report is not an option here - the user is testing different scenarios here - do some change, try to understand the effect, do some other change and so on.

Maybe I could use a very wide textbox with very small height and use conditional formatting. It just seems too difficult (though not impossible) to write the SQL that I could bind the textbox to.
 

SunWuKung

Registered User.
Local time
Today, 00:39
Joined
Jun 21, 2001
Messages
172
I think I finally cracked this.
1. Create a textbox in the detail section above your data
Name=Separator
ControlSource:=SeparatorVisible([TargetOrder])
2. Create a textbox in the header
Name=PreviousTargetOrder
Visible=False
3. Put the following code in the form
Function SeparatorVisible(TargetOrder As Integer)
If Me.PreviousTargetOrder <> TargetOrder Then SeparatorVisible = 1 Else SeparatorVisible = 0
Me.PreviousTargetOrder = TargetOrder
End Function
4. Set conditional formatting for the Separator - black if 1 the color of the form othervise

SWK
 

tobing

New member
Local time
Yesterday, 16:39
Joined
Nov 24, 2010
Messages
1
I try to created it but still problem. Can you give a sample in mdb.
Thank's a lot


I think I finally cracked this.
1. Create a textbox in the detail section above your data
Name=Separator
ControlSource:=SeparatorVisible([TargetOrder])
2. Create a textbox in the header
Name=PreviousTargetOrder
Visible=False
3. Put the following code in the form
Function SeparatorVisible(TargetOrder As Integer)
If Me.PreviousTargetOrder <> TargetOrder Then SeparatorVisible = 1 Else SeparatorVisible = 0
Me.PreviousTargetOrder = TargetOrder
End Function
4. Set conditional formatting for the Separator - black if 1 the color of the form othervise

SWK
 

Users who are viewing this thread

Top Bottom