J
jsteeves
I need to concatenate several fields to provide some visual feedback to the
user.
Problem is each field is packed full of spaces at the end
ex. "CUSTOMERNAME - CITY , STATE
"
i want to trim the recordset returned by the lists row source query.
here is what i THOUGHT would work....
but it justs reads it like the field name is the string i want to trim
Private Sub cboOrdno_AfterUpdate()
Dim WhereLine As String
Dim WhereCust As String
WhereLine = "SELECT Line_" _
& " FROM ordimg WHERE ordno = " & Me.cboOrdno _
& " ORDER BY Line_"
WhereCust = "SELECT ordno, " _
& Trim("[stnam]") & " & ' - ' & " _
& Trim("[stad3]") & " & ', ' & " _
& Trim("[stste]") & " & ' ' & " _
& Trim("[stad5]") & "" _
& " FROM ordimg WHERE ordno = " & Me.cboOrdno _
& " ORDER BY stnam"
Debug.Print WhereLine
Debug.Print WhereCust
Me.cboLine.RowSource = WhereLine
Me.cboCust.RowSource = WhereCust
End Sub
user.
Problem is each field is packed full of spaces at the end
ex. "CUSTOMERNAME - CITY , STATE
"
i want to trim the recordset returned by the lists row source query.
here is what i THOUGHT would work....
but it justs reads it like the field name is the string i want to trim
Private Sub cboOrdno_AfterUpdate()
Dim WhereLine As String
Dim WhereCust As String
WhereLine = "SELECT Line_" _
& " FROM ordimg WHERE ordno = " & Me.cboOrdno _
& " ORDER BY Line_"
WhereCust = "SELECT ordno, " _
& Trim("[stnam]") & " & ' - ' & " _
& Trim("[stad3]") & " & ', ' & " _
& Trim("[stste]") & " & ' ' & " _
& Trim("[stad5]") & "" _
& " FROM ordimg WHERE ordno = " & Me.cboOrdno _
& " ORDER BY stnam"
Debug.Print WhereLine
Debug.Print WhereCust
Me.cboLine.RowSource = WhereLine
Me.cboCust.RowSource = WhereCust
End Sub