A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Supress Duplicate detail elements until sequence number changes



 
 
Thread Tools Display Modes
  #1  
Old August 11th, 2005, 10:51 PM
richardb
external usenet poster
 
Posts: n/a
Default Supress Duplicate detail elements until sequence number changes

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.

Thank you.
  #2  
Old August 12th, 2005, 01:21 AM
richardb
external usenet poster
 
Posts: n/a
Default

I resolved this with some code in the detail on-print Sub. I stored the
sequence number in a global variable. Then if my current seq number = the
last seq number I made the elements I wanted to supress not visible.
e.g. Me!txtMyElement.Visible = Not CurrentSeq = Last Seq

"richardb" wrote:

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.

Thank you.

  #3  
Old August 12th, 2005, 05:13 AM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

richardb wrote:

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.



You should group (View - Sorting and Grouping menu) on the
sequence number eith all but one(?) field in the group
header section. Place the payment code in the detail
section. To get the first detail on the same line as the
group header, add this line to the group header section's
Format event:
Me.MoveLayout = False

--
Marsh
MVP [MS Access]
  #4  
Old August 12th, 2005, 09:55 AM
richardb
external usenet poster
 
Posts: n/a
Default

That is very cool and useful. Thank you very much.

"Marshall Barton" wrote:

richardb wrote:

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.



You should group (View - Sorting and Grouping menu) on the
sequence number eith all but one(?) field in the group
header section. Place the payment code in the detail
section. To get the first detail on the same line as the
group header, add this line to the group header section's
Format event:
Me.MoveLayout = False

--
Marsh
MVP [MS Access]

  #5  
Old August 12th, 2005, 11:12 AM
richardb
external usenet poster
 
Posts: n/a
Default

Dear Marshall,

Thanks again. Now I have a follow-up question: Is it possible, in the detail
section of a report to "tell" the report: If mycondition = true, then don't
use this line in the report. Don't print it or leave a space, don't use it in
totals, just go on to the next item? Thanks.

"Marshall Barton" wrote:

richardb wrote:

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.



You should group (View - Sorting and Grouping menu) on the
sequence number eith all but one(?) field in the group
header section. Place the payment code in the detail
section. To get the first detail on the same line as the
group header, add this line to the group header section's
Format event:
Me.MoveLayout = False

--
Marsh
MVP [MS Access]

  #6  
Old August 12th, 2005, 11:44 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

richardb wrote:
Thanks again. Now I have a follow-up question: Is it possible, in the detail
section of a report to "tell" the report: If mycondition = true, then don't
use this line in the report. Don't print it or leave a space, don't use it in
totals, just go on to the next item? Thanks.



That kind of thing should be done in the report's record
source query where you can use the condition as a criteria.
This will exclude the records from the data set that the
report sees.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SORTING BY PERCENTAGE jeanne Running & Setting Up Queries 6 January 19th, 2005 09:33 PM
Limit number of detail records per page larry.abell Setting Up & Running Reports 3 December 7th, 2004 02:41 AM
Length of 'detail' are in report KLP Setting Up & Running Reports 1 November 24th, 2004 03:51 AM
Print info in page header if condition is satisfied in detail section Ron Setting Up & Running Reports 2 September 1st, 2004 10:54 PM
Additional Detail Lines Antony Elson Using Forms 3 August 23rd, 2004 03:58 PM


All times are GMT +1. The time now is 06:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.