Trying to figure out how to format a certain report layout.

  • Thread starter kelly d via AccessMonster.com
  • Start date
K

kelly d via AccessMonster.com

I have a report I'm trying to automate that used to be created by a person
manually in Word, a very un-assuming layout but proving to be harder than it
looks and this layout needs to be matched in an access report cuz it is being
insisted upon to me. instead of trying to explain the layout, i'm going to
attempt (at least somewhat) to recreate it here a-la-characters. if anybody
has had to do this before, tips and techniques on how you accomplished it
would be appreciated. the layout looks something like this:

___________________________
| type | code | comment |
---------------------------
| type1 | code1 | comment1 |
| | code2 | comment2 |
---------------------------
| type2 | code1 | comment1 |
| | code2 | comment2 |
| | code3 | comment3 |
---------------------------
| type3 | code1 | comment1 |
---------------------------
| type4 | code1 | comment1 |
| | code2 | comment2 |
---------------------------
etc, etc thru the whole report where each type,code,comment is one record in
the recordset, thus comprising the entire detail section, and the field that
the report is grouped on, [type], is to appear once in each group, and is to
appear in-line with the first record of that group and then to have a box
around not each detail, but rather, each group of details. I have considered,
rather than a report, a function that opens a recordset filtered on the same
field that the report would have been grouped on, [type], cycling thru the
records in that recordset adding them to a variable separated by a VbCrLf so
that they go vertical in the variable, then sending the variables thru
automation to Excel and cycle thru each different [type] value in the table
then using automation to turn the Excel borders on around each cell (which
would be like a box around each group cuz each cell would contain all of the
records for that group)
but I really wanted this to be kept within the application using a report.
Any insight on how I might pull this off would be appreciated cuz this ones
eluding me.

thanks.
 
M

Marshall Barton

kelly said:
I have a report I'm trying to automate that used to be created by a person
manually in Word, a very un-assuming layout but proving to be harder than it
looks and this layout needs to be matched in an access report cuz it is being
insisted upon to me. instead of trying to explain the layout, i'm going to
attempt (at least somewhat) to recreate it here a-la-characters. if anybody
has had to do this before, tips and techniques on how you accomplished it
would be appreciated. the layout looks something like this:

___________________________
| type | code | comment |
---------------------------
| type1 | code1 | comment1 |
| | code2 | comment2 |
---------------------------
| type2 | code1 | comment1 |
| | code2 | comment2 |
| | code3 | comment3 |
---------------------------
| type3 | code1 | comment1 |
---------------------------
| type4 | code1 | comment1 |
| | code2 | comment2 |
---------------------------
etc, etc thru the whole report where each type,code,comment is one record in
the recordset, thus comprising the entire detail section, and the field that
the report is grouped on, [type], is to appear once in each group, and is to
appear in-line with the first record of that group and then to have a box
around not each detail, but rather, each group of details. I have considered,
rather than a report, a function that opens a recordset filtered on the same
field that the report would have been grouped on, [type], cycling thru the
records in that recordset adding them to a variable separated by a VbCrLf so
that they go vertical in the variable, then sending the variables thru
automation to Excel and cycle thru each different [type] value in the table
then using automation to turn the Excel borders on around each cell (which
would be like a box around each group cuz each cell would contain all of the
records for that group)
but I really wanted this to be kept within the application using a report.
Any insight on how I might pull this off would be appreciated cuz this ones
eluding me.

You can group on the type field and use a text box in the
group header section to display the type. To get the group
header section to display with (actually under) the first
detail, add a line of code to the header section's Format
event:
Me.MoveLayout = False

You can put the rectangle's top line as a horizontal line at
the top of the header section. As long as the detail
section can not grow, you can use a vertical line in the
detail section for the sides of the rectangle. If the
detail section can grow, then use the line method in the
detail section's Print event:
Me.Line (txtCode.Left,0) - Step(0,30000)
Me.Line (txtComment.Left + txtComment.Width,0) -
Step(0,30000)

For the last bottom line, try using the report's footer
section with a horizontal line at the top.
 
K

kelly d via AccessMonster.com

thank you very much.
I knew there had to be an easy answer.
I had everything but the move layout bit.

Funny how that one little line:

me.MoveLayout = False

was able to turn an entire days worth of head-scratching into 2 minutes worth
of work.

thanks again,
Kelly D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top