How do I sort correctly

tjtross

Registered User.
Local time
Yesterday, 21:00
Joined
Mar 31, 2015
Messages
12
I am trying to created a concatenated date of yyyy/mmm from a MM/DD/YYYY. After concatenating I get 2014/Feb, 2014/Jan.... which is the look I want, but when I sort it, April comes before Jan. Unless someone changed things and didn't tell me, I screwed something up.
Any help would be greatly appreciated.
 
You might consider a separate field specific to sort order. If you go that route, use numeric values and it will sort in the manner you expect. If you have a text field and fill it with numerics, you'll still get an alpha sort where 1,11,111 sort before 2,3,4 ...

Good luck.
 
I am trying to created a concatenated date of yyyy/mmm from a MM/DD/YYYY

Little confused since you posted this in the Tables forum. If you have a date field in a table, you shouldn't be storing this concatenated value as well. You don't store redundant data. Instead this yyyy/mmm field should be in a query.

If it is in a query, then your issue is simple. You display your yyyy/mmm field and sort by your date field.
 
plog, I was trying to do it in a table to make my life a little easier. I don't know much about Access. I have only taken 3 days of class, then I was thrown into the fire.
Here is what I am trying to do:
I created a query to populate 2 comboboxes on my startup form ( it has YYY/MM) as choices.
I then created another query to show work hours ( sorted by order no. and location)
I am wanting to also be able to have the choice of looking at a date range, based on using the combo boxes
 

Users who are viewing this thread

Back
Top Bottom