Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Date order for months on query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Todd - 30 Nov 2005 20:43 GMT
I have a combo box on a form that contains the months in text format. They
appear in month order on the form but when I query, they are in alphabetical.
How can I get this to be in month order on the query and also look like
months in my cbo and not dates?
George Nicholson - 30 Nov 2005 22:43 GMT
add a field to your query, and then sort on it, not the MonthName:
MonthSortOrder: Month(DateValue(MonthNameField & " 1, 2005"))

if MonthNameField contains "January" then the above will return 1 (the day &
year used are immaterial)

HTH,
Signature

George Nicholson

Remove 'Junk' from return address.

>I have a combo box on a form that contains the months in text format. They
> appear in month order on the form but when I query, they are in
> alphabetical.
> How can I get this to be in month order on the query and also look like
> months in my cbo and not dates?
OfficeDev18 - 30 Nov 2005 22:48 GMT
Make your combo box's rowsource 2 columns, with a hidden column being numeric,
numbered 1 thru 12, sorted on that  hidden column. To hide the column, make
the ColumnWidths property 0";1" for example, to hide column 1; to hide column
2, do the opposite. Don't forget to change the ColumnCount to 2. All entries,
of course, are in the combo box's property sheet.

HTH

>I have a combo box on a form that contains the months in text format. They
>appear in month order on the form but when I query, they are in alphabetical.
>How can I get this to be in month order on the query and also look like
>months in my cbo and not dates?

Signature

Sam

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.