help w/sorting two columns one with date checked out, other with date due back. some are overdue and there is not a date entered yet. need to sort by the longest overdue first and leave out those that have already been returned
I have the data below in a query in Access, and I want it to sort by the Week Begin date. I have put a sort on for 'Ascending' but it doesn't work. (Due to the 29th being after the 28th - regardless of month)
Is there any way I can force the sort in this query ? It must be in the same query though, as I could probably do it by using this query in another one then sorting that. However, I don't want to do that for reasons I won't bore you with.
PS - I should mention that I think it is because the WekBegin date is an expression based on an actual date field. Therefore I believe it's treating it as some sort of text field.
I've just started playing with Access 2002 (Office XP) and I@m having a little bit of trouble.
I'm using the Query Wizard to summarise my database giving me average values for each month. When the query is first run it displays in the correct month order: April, May, June, July, August, September. But viewing the query again or when trying to graph the data in a Form, the sorting forces alphabetical order: April, August, July, June, May, September.
How can I get the query/form to return the results in true month order?
Here's the SQL info which the Wizard created:
SELECT DISTINCTROW Format$([Raw Data].[TimeStamp],'mmmm yyyy') AS [TimeStamp By Month], Avg([Raw Data].[Indoor Temperature]) AS [Avg Of Indoor Temperature], Min([Raw Data].[Indoor Temperature]) AS [Min Of Indoor Temperature], Max([Raw Data].[Indoor Temperature]) AS [Max Of Indoor Temperature] FROM [Raw Data] GROUP BY Format$([Raw Data].[TimeStamp],'mmmm yyyy'), Year([Raw Data].[TimeStamp])*12+DatePart('m',[Raw Data].[TimeStamp])-1;
I have a subform that simulates a listbox and I click on the header label to activate the sort. My problem is sorting by date. Below is the sort function and one of the date labels that I need to sort on.
Sort Function:Code: ========================================== Private Function SortOrder(col As String, xorder As String) As Integer Dim strSQL As String Dim sf As Form Set sf = Forms!frmMainEntry!fctlNotifications.Form strSQL = "SELECT DISTINCTROW ProgramID, ProgramDescription, Facility, ResponsibleParty, DueDate, FrequencyOfService, AdvancedNoticeDate " strSQL = strSQL & "FROM qryProgramList " strSQL = strSQL & "ORDER BY " & col & " " & xorder sf.RecordSource = strSQL sf.Form.Requery End Function ==========================================
On-Click Date:Code: ========================================== Private Sub lblDueDate_Click() Dim response As Integer If Me.txtSortOrder = "DESC" Then response = SortOrder(CDate(DueDate), "asc") Me.txtSortOrder = "asc" Else response = SortOrder(CDate(DueDate), "DESC") Me.txtSortOrder = "DESC" End If End Sub ========================================== I'm not sure if I should convert the date into something that can be sorted or just leave it as a date. I can't get it to work. Help please.
I am having some trouble sorting my date and times. I have them both working great individually with RunCommand Sort Ascending after Update. The problem is, the dates will get jumbled up after the time is sorted. Is there a way to connect the two fields where the dates will always stay in order? I have attached a pic of this DB if it helps any. Thanks so much for any help.
i have a date field where about 80% of the data is entered in the format dd/mm/yyyy but the rest may be year only since the exact date is not known. Therefore, it does not have an input mask or a format set. Is it still possible to sort on that field? (As i write this i realise it is probably a dumb question but always worth a shot!)
I have what is probably a simple question. I want to sort my date field in a query by the most recent date. When I use ascending or descending it looks at the Month/day/year to sort it. I need it to look at year/day/month.
I created a query which at first was simply to run a query which asks you for a drivers name, however we have decided that now we want to sort by the employee name as well as by a specified date range. I originaly had it set up to select the driver name with this in the criteria field in the Driver Name column:
[Enter Driver Name]
Then I tried to enter the following in to the criteria field in the date column:
Between [Enter Start Date: (Format MM-DD-YY)] And [Enter End Date: (Format MM-DD-YY]
However when I run the query it asks me for the date about 4 times, and then it goes to a blank report. I am sure I am not doing this properly somehow, anyone care to help out?
I have a cross tab query for which I want to display the dayes in mmm-yy format. I am grappling with the problem that this is essentially a string, so gets sorted alphanumerically.
Having read around related forums I have tried basing the XTab on a select query, which is sorted by the conventialal date, but also has another field that gives a date using Format([DateAdded],"mmm-yy").
Trouble is, Access only lets me bring across 1 column heading, so I must sort on the column I display, and this doesn't solve the problem.
The coulmn headings are not be fixed (i.e. "Jan";"Feb" etc) as the months are financial year months (April - March).
I can get this too work by using yyyy/mm, but my board of directors are not happy with this format.
Any ideas. I would be open to re-querying my Xtab from another query of from a report if that worked.
I have a query where I ORDER BY ClientId, MatterId and Transdate. The result of the query is correct. All of the transdates are in ASC order within the Matter.
When I run the report for a MatterId the relative transactions are not sorted on transdate
Can there be something in the report that could be effecting the order of the transactions.
I have a field on a table that is a DateTime format and it needs to be that way. I am trying to query that table for all the dates to use in a combobox but I only wat the date not the time. The problem is when I format the field to just date I can't sort it anymore as a date and I can't group them. I still get multiple lines in my combobox because there multiple times for the same day. what is the proper way in a query to extract just the date from a field and still sort it as date ie 1/12/2015 is greater than 12/15/2014?
I have a subform which tracks all the notes our personnel have entered in a specific project (which is the main form).
The issue is that I want the most current note to show in the subform when the project is "opened up". The underlying query for the subform has the [DATE] field sorted on "Descending".
Hi all. I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number. I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.
Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..
I'd apreciate some help with this :) Thanks
Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)
Could anyone tell me how I sort a field so it sorts by the surname, not the first name? It's one field with 2 names seperated by a space, i.e. George Michael.
I am doing a database containing names, dates of birth, dates of death etc of my ancestors. Does anyone know the best way of displaying it so I can sort them out by age of death? For example, I want to see someone for example who died aged 70 years and 6 months to be a place above someone who died aged 70 years and 4 months.
Yet another question! When I run the report, it gives me the results in alphabetical order (i.e. April August, etc) instead of monthly order... Is there a way to fix this?
I have a field with addresses (numbers and letters) Whenever I try to sort it sorts by the number. How do I get it to only sort by the letters but still include the numbers in the result?
I have been trying to solve this Access problem for a couple of weeks. I have 2 Access 2002 files where I import info from a Paradox DB. I have been doing this for 12 years. I just bought a new laptop and transferred the programs over (I didn't reinstall because I don't have a floppy drive). Paradox files have a default of an International sort order.
One of my 2 Access files is now requiring an Ascii sort order. The Paradox forum says that something in the Access file is asking for the Ascii sort sequence. I have to keep bouncing back and forth in the Regedit changing the sort order from International to Ascii and back again to use the 2 files.
Do you know how I can make the 1 Access file ask for the International sort order?
I have a table with an alphanumeric field I want to sort on. If I sort the usual ascending way, data that is numeric is sorted before data that is alpha.
Is there a way to have the alpha data sorted ascending come out ahead of the numeric data srted ascending?
i have a simple datsbase with 2 fields - drawing number and description. the drawing numbers are in the formatt STD123 e.t.c. When I try to sort numerically the order ends up as STD1 STD10 STD11 STD100 STD101.......... How do I get it to list in true numeric order in report and table view i.e. STD1 STD2 STD3.......... Please bear in mind that my knowledge of Access is VERY limited. I've tried a search and don't understand about queries and such like. Even so I'd have thought that even the most basic database programmes would be able to handle something as simple as an alpha/numeric sort list....seems not!!!!! ????????????????
i need to write some type of query or report that will group the skills into the numerical categories 1-9 and then in each of those groups listthe skills autamaticall and then have a way to print it out either in word or excel looking some thing like this
How can I sort string addresses so as to get the correct number order? I know that strings sort on each character, which causes the problem. I have tried some things (with VAL and Len), but was not completely successful. I do not want to enter an address number as 0630, when I want 630.
Why does this not work:IIf(Len(Str(Val([address]))=3),"0" & [address],[address])? Address has 3 and 4 numbers only.
I have a job database where I sort jobs by upcoming, inactive, closed and active. Each has a corresponding number 1-4 respectively. The main table I update the jobs in is the JOB TABLE. I print a weekly report for our weekly meeting but I only want the active jobs in the report. My question is: how do I perform a sort function in the query, so I will have only the active jobs in the database table show in the query? Thanks in advance! If more info is needed I wil post additonal.