R
Robbie Doo
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?
Access report the way you do in Excel?
If so, would it be done by code?
Duane Hookom said:You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?
Robbie Doo said:Thank you Duane but the field I want merged is the same field. I used
"Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I
can
merge the cells with the same name into one and Center it whether it's
column
or row. I know how to do this in a row in access, because it's easy to
work
horizontally in the Detail section. However, the case is different when
working with columns.
Duane Hookom said:You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of
the
text box is not the name of a field.
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:Is it possible to merge the fields and center (in the same column) it
in
Access report the way you do in Excel?
If so, would it be done by code?
Robbie Doo said:Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
Duane Hookom said:You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?
Duane Hookom said:Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
Duane Hookom said:You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
Duane Hookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
DuaneHookom said:Please take the time to type in some records of raw data and then how you
want them displayed in your report.Thank you Duane but the field I want merged is the same field. I used"Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
duanehookom said:I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
DuaneHookom said:Please take the time to type in some records of raw data and then how you
want them displayed in your report."Robbie Doo" wrote:Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns."DuaneHookom" wrote:You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field."Robbie Doo" wrote:Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
Robbie Doo said:No, 3 is only in my example. Records can be 2 or more per month. What I'm
looking for is borders around the months and months to be centered (if
possible). Putting borders around the other date (i.e., A1, A2...) is easy.
I'm just struggling with the month columns. I use the "Hide Duplicates"
feature, which gives me the month and empty bordered fields until the next
month. I just want to get rid of those extra empty bordered areas and merge
all into one and center the month. Is this possible in Access?
Thank you for all your help.
duanehookom said:I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
:
Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
DuaneHookom
Microsoft Access MVP
:
Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
Duane Hookom said:The month will need to fall into alignment with one of the records in the
detail section.
Create a group header section on the month and add a text box:
Name: txtMthRecords
Control Source: =Count(*)
Set the month group header section's Visible property to No.
Add a text box to the detail section:
Name: txtMthCount
Control Source: =1
Running Sum: Over Group
Visible: No
Make sure you have the Month bound to a control in the detail section.
Name: txtMth
Add this code to the On Format event of the detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intMidRecord As Integer
intMidRecord = (Me.txtMthRecords + 1) \ 2
Me.txtMth.Visible = (intMidRecord = Me.txtMthCount)
Me.Line (Me.txtMth.Left, 0)-Step(0, Me.Height)
Me.Line (Me.txtMth.Left + Me.txtMth.Width, 0)-Step(0, Me.Height)
If Me.txtMthCount = 1 Then 'first record in month
Me.Line (Me.txtMth.Left, 0)-Step(Me.txtMth.Width, 0)
End If
If Me.txtMthCount = Me.txtMthRecords Then 'last record in month
Me.Line (Me.txtMth.Left, Me.Height)-Step(Me.txtMth.Width, 0)
End If
End Sub
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:No, 3 is only in my example. Records can be 2 or more per month. What I'm
looking for is borders around the months and months to be centered (if
possible). Putting borders around the other date (i.e., A1, A2...) is easy.
I'm just struggling with the month columns. I use the "Hide Duplicates"
feature, which gives me the month and empty bordered fields until the next
month. I just want to get rid of those extra empty bordered areas and merge
all into one and center the month. Is this possible in Access?
Thank you for all your help.
duanehookom said:I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
On Nov 9, 9:56 am, Robbie Doo <[email protected]>
wrote:
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
:
Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
DuaneHookom
Microsoft Access MVP
:
Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
Duane Hookom said:The month will need to fall into alignment with one of the records in the
detail section.
Create a group header section on the month and add a text box:
Name: txtMthRecords
Control Source: =Count(*)
Set the month group header section's Visible property to No.
Add a text box to the detail section:
Name: txtMthCount
Control Source: =1
Running Sum: Over Group
Visible: No
Make sure you have the Month bound to a control in the detail section.
Name: txtMth
Add this code to the On Format event of the detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intMidRecord As Integer
intMidRecord = (Me.txtMthRecords + 1) \ 2
Me.txtMth.Visible = (intMidRecord = Me.txtMthCount)
Me.Line (Me.txtMth.Left, 0)-Step(0, Me.Height)
Me.Line (Me.txtMth.Left + Me.txtMth.Width, 0)-Step(0, Me.Height)
If Me.txtMthCount = 1 Then 'first record in month
Me.Line (Me.txtMth.Left, 0)-Step(Me.txtMth.Width, 0)
End If
If Me.txtMthCount = Me.txtMthRecords Then 'last record in month
Me.Line (Me.txtMth.Left, Me.Height)-Step(Me.txtMth.Width, 0)
End If
End Sub
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:No, 3 is only in my example. Records can be 2 or more per month. What I'm
looking for is borders around the months and months to be centered (if
possible). Putting borders around the other date (i.e., A1, A2...) is easy.
I'm just struggling with the month columns. I use the "Hide Duplicates"
feature, which gives me the month and empty bordered fields until the next
month. I just want to get rid of those extra empty bordered areas and merge
all into one and center the month. Is this possible in Access?
Thank you for all your help.
duanehookom said:I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
On Nov 9, 9:56 am, Robbie Doo <[email protected]>
wrote:
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
:
Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
DuaneHookom
Microsoft Access MVP
:
Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
Robbie Doo said:Thank you Duane. This is exactly what I was looking for. However, when the
month is continued onto the next page the bottom part of the page doesn't
have a border. Is it possible to close the border then continue onto the next
page even if no month-name will appear until the next one?
Thanx again for all your help.
Duane Hookom said:The month will need to fall into alignment with one of the records in the
detail section.
Create a group header section on the month and add a text box:
Name: txtMthRecords
Control Source: =Count(*)
Set the month group header section's Visible property to No.
Add a text box to the detail section:
Name: txtMthCount
Control Source: =1
Running Sum: Over Group
Visible: No
Make sure you have the Month bound to a control in the detail section.
Name: txtMth
Add this code to the On Format event of the detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intMidRecord As Integer
intMidRecord = (Me.txtMthRecords + 1) \ 2
Me.txtMth.Visible = (intMidRecord = Me.txtMthCount)
Me.Line (Me.txtMth.Left, 0)-Step(0, Me.Height)
Me.Line (Me.txtMth.Left + Me.txtMth.Width, 0)-Step(0, Me.Height)
If Me.txtMthCount = 1 Then 'first record in month
Me.Line (Me.txtMth.Left, 0)-Step(Me.txtMth.Width, 0)
End If
If Me.txtMthCount = Me.txtMthRecords Then 'last record in month
Me.Line (Me.txtMth.Left, Me.Height)-Step(Me.txtMth.Width, 0)
End If
End Sub
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:No, 3 is only in my example. Records can be 2 or more per month. What I'm
looking for is borders around the months and months to be centered (if
possible). Putting borders around the other date (i.e., A1, A2...) is easy.
I'm just struggling with the month columns. I use the "Hide Duplicates"
feature, which gives me the month and empty bordered fields until the next
month. I just want to get rid of those extra empty bordered areas and merge
all into one and center the month. Is this possible in Access?
Thank you for all your help.
:
I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
On Nov 9, 9:56 am, Robbie Doo <[email protected]>
wrote:
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
:
Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
DuaneHookom
Microsoft Access MVP
:
Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
Duane Hookom said:I would just group by month and choose to keep the whole group together.
--
Duane Hookom
Microsoft Access MVP
Robbie Doo said:Thank you Duane. This is exactly what I was looking for. However, when the
month is continued onto the next page the bottom part of the page doesn't
have a border. Is it possible to close the border then continue onto the next
page even if no month-name will appear until the next one?
Thanx again for all your help.
Duane Hookom said:The month will need to fall into alignment with one of the records in the
detail section.
Create a group header section on the month and add a text box:
Name: txtMthRecords
Control Source: =Count(*)
Set the month group header section's Visible property to No.
Add a text box to the detail section:
Name: txtMthCount
Control Source: =1
Running Sum: Over Group
Visible: No
Make sure you have the Month bound to a control in the detail section.
Name: txtMth
Add this code to the On Format event of the detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intMidRecord As Integer
intMidRecord = (Me.txtMthRecords + 1) \ 2
Me.txtMth.Visible = (intMidRecord = Me.txtMthCount)
Me.Line (Me.txtMth.Left, 0)-Step(0, Me.Height)
Me.Line (Me.txtMth.Left + Me.txtMth.Width, 0)-Step(0, Me.Height)
If Me.txtMthCount = 1 Then 'first record in month
Me.Line (Me.txtMth.Left, 0)-Step(Me.txtMth.Width, 0)
End If
If Me.txtMthCount = Me.txtMthRecords Then 'last record in month
Me.Line (Me.txtMth.Left, Me.Height)-Step(Me.txtMth.Width, 0)
End If
End Sub
--
Duane Hookom
Microsoft Access MVP
:
No, 3 is only in my example. Records can be 2 or more per month. What I'm
looking for is borders around the months and months to be centered (if
possible). Putting borders around the other date (i.e., A1, A2...) is easy.
I'm just struggling with the month columns. I use the "Hide Duplicates"
feature, which gives me the month and empty bordered fields until the next
month. I just want to get rid of those extra empty bordered areas and merge
all into one and center the month. Is this possible in Access?
Thank you for all your help.
:
I still can't see your "raw data". You only presented how you want
them displayed in your report. You are giving us the impression there
always three records per month. Is this true? Are there borders
required?
Duane Hookom
MS Access MVP
On Nov 9, 9:56 am, Robbie Doo <[email protected]>
wrote:
Thank you Duane,
I would like the report to be something like this:
----------------------------
| A1 |
Jan | A2 |
| A3 |
---------------------------
| B1 |
Feb | B2 |
| B3 |
---------------------------
The month Column is merged and centered vertically. Is it possible?
:
Please take the time to type in some records of raw data and then how you
want them displayed in your report.
--
DuaneHookom
Microsoft Access MVP
:
Thank you Duane but the field I want merged is the same field. I used "Hide
Duplicates" but it gives me empty boxes until the next record. In Excel I can
merge the cells with the same name into one and Center it whether it's column
or row. I know how to do this in a row in access, because it's easy to work
horizontally in the Detail section. However, the case is different when
working with columns.
:
You can use a text box with a control source like:
=[FirstName] & " " & [LastName]
or
=[City] & ", " & [State] & " " & [ZipCode]
Set the alignment of the text box to centered and make sure the name of the
text box is not the name of a field.
--
DuaneHookom
Microsoft Access MVP
:
Is it possible to merge the fields and center (in the same column) it in
Access report the way you do in Excel?
If so, would it be done by code?- Hide quoted text -
- Show quoted text -
.
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.