Concatenate 2 field in a control source and sort by one field

MrTickle

New member
Local time
Today, 04:02
Joined
Aug 30, 2012
Messages
9
Hi there

Hopefully this is a very simple question. I have a text box in a report bound by datasource as follows:

=[Guest Firstname] & " " & [Guest Lastname]

I want the results to be ordered by [Guest Lastname], but I am not sure of the syntax when using 'OrderBy' and nothing I have tried has worked.

Can anyone help please?

Thanks in advance!
 
You should be able to do this easily with your query query in design view.

The SQL syntax can be found here
 
The query would be the way it really should be done. But just for informational purposes you can create a field like that in the sorting and grouping of the report and sort on it. So you can use

=[Guest Firstname] & " " & [Guest Lastname]

just like this:

attachment.php


But the more efficient way is to concatenate in the query and then set the sort in the report.
 

Attachments

  • reportsortoncustomgroup.png
    reportsortoncustomgroup.png
    10 KB · Views: 1,448
Thank you Bob and John, this has sorted it. I concatenated at query level and sorted at report stage and all is looking great.

Thanks again!
 

Users who are viewing this thread

Back
Top Bottom