K
Krista H
Using Office 2007/Vista
trying to get multiple data fields from a table into one field on a report.
It works great if I want all the data concatenated together, however I would
like add linefeeds/carriage returns between the values. I searched the forum
and online and haven't found a solution that works.
Here is the code without the line feeds: (I would like linefeeds between the
Size, Color and ProductName data)
Private Sub Report_Open(Cancel As Integer)
On Error GoTo Err_Report_Open
Dim sqlDetail As String
sqlDetail = "Select *, ""Size: "" & Size & "" Color: "" & Color & " & _
" "" Product Name: "" & ProductName AS Description " & _
"from tbl_OrderDetails " & _
"WHERE OrderId=" & glbPrintOrderId & " ;"
Me.RecordSource = sqlDetail
Exit_Report_Open:
Exit Sub
Err_Report_Open:
MsgBox Err.Description
Resume Exit_Report_Open
End Sub
trying to get multiple data fields from a table into one field on a report.
It works great if I want all the data concatenated together, however I would
like add linefeeds/carriage returns between the values. I searched the forum
and online and haven't found a solution that works.
Here is the code without the line feeds: (I would like linefeeds between the
Size, Color and ProductName data)
Private Sub Report_Open(Cancel As Integer)
On Error GoTo Err_Report_Open
Dim sqlDetail As String
sqlDetail = "Select *, ""Size: "" & Size & "" Color: "" & Color & " & _
" "" Product Name: "" & ProductName AS Description " & _
"from tbl_OrderDetails " & _
"WHERE OrderId=" & glbPrintOrderId & " ;"
Me.RecordSource = sqlDetail
Exit_Report_Open:
Exit Sub
Err_Report_Open:
MsgBox Err.Description
Resume Exit_Report_Open
End Sub