We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Trouble with Left Function Use in Grouping

Medium Priority
261 Views
Last Modified: 2012-06-27
I am trying to group by first letter of last name in a report using the LEFT function and have a header at the top of each grouping of a letter.  All the last names starting with A etc....

I have tried using this syntax but with no luck..  what am i doing wrong?

= LEFT([Last Name],1)

Thanks for your help!!
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016

Commented:
where did you use this ?
  = LEFT([Last Name],1)


try adding a column to your query

select LEFT([Last Name],1) from table
group by  LEFT([Last Name],1)

Author

Commented:
used it in the Group/Sort Section  and in a field within the Group Header
CERTIFIED EXPERT
Top Expert 2016

Commented:
try adding the column to the record source of the report first

Author

Commented:
Not sure I follow what you mean.  Can you explain further... Thanks!

Author

Commented:
Here is a copy of the database..  Please see rptCustomersDefault.

Thanks
Section-6-Northwind.accdb
CERTIFIED EXPERT
Top Expert 2016
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
perfect!  What did you do?   Was it simply you moved the grouping to the top of the order?

Thanks!
CERTIFIED EXPERT
Top Expert 2016

Commented:
yes

Author

Commented:
very quick response.  Excellent help!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.