|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Concatonating
Hello, my first post on this site. I have a small procedure in VBA that populates the Row Source of a Combo box in Access 2002.
It works fine, except it is not concatonating the Last name, and First name like I want. I am looking for "Doe, John". What I get is "Doe". Can someone tell me what I'm doing wrong? I have pasted it into the SQL view of a query, and it works. Just not in code. Any help is appreciated since this is driving me mad! Code: Private Sub Form_Load() Dim strActiveSQL As String If IsNull(Me!AssignedTech.Value) Then strActiveSQL = "SELECT [EmployeeID], [EmployeeLastName]" & ", " & "[EmployeeFirstName] AS [EmployeeFullName] FROM tblUsers " & _ "WHERE Active = True ORDER BY EmployeeLastName, EmployeeFirstName;" Else strActiveSQL = "SELECT [EmployeeID], [EmployeeLastName]" & ", " & "[EmployeeFirstName] AS [EmployeeFullName] FROM tblUsers " & _ "ORDER BY EmployeeLastName, EmployeeFirstName;" End If Me!EmployeeName.RowSource = strActiveSQL End Sub |
|
#2
|
|||
|
|||
|
Code:
query = "SELECT [EmployeeID], [EmployeeLastName] & ',' & [EmployeeFirstName] as [EmployeeFullName] ... " |
|
#3
|
|||
|
|||
|
A THOUSAND THANK YOU's!!!!!!!!! YOU ROCK! That's been driving me crazy all day!
I get rusty on this stuff. I don't do it very often. Again....Thanks! |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Concatonating |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|