Sort Not Working (Ascending)
Feb 24, 2005
Goodday All
I am having a bit of a problem with one of my tables. I am using VBA code to add data to one of my tables, my problem is that even when I manually sort the table, it still gives me problem.
For example, I have a table that stores mobile numbers by year and month. I manually sort it by year- Ascending, but it still gives me this jumbled up table. I even tried writing a query to pull out the data and set the Sort by ascending and yet still it gives me this. What am I doing wrong?
MobileNo YearMonthRental Fees
+27241214282004Dec0.0089.60
+27245873742004Dec0.00607.89
+27256801612004Dec0.00607.89
+27245998662005Feb0.00246.00
+27246790232005Feb0.00246.49
+27249275562005Feb0.00335.96
+27278115852005Jan0.00782.04
+27249442532005Jan0.00357.40
+27278100662005Jan0.00137.70
Thanx for all the help
Kind Regards
View Replies
ADVERTISEMENT
Aug 15, 2006
I have query that uses the following forumla "Team HCP2: ([Member Frt HCP]+[Member Back HCP]+[Guest Frt HCP]+[Guest Back HCP])/2" to calculate team handicaps. The formula performs as I need it to but when I try to check the sort box to sort "Ascending" it asks for a parameter.
All I want to do is run the query and have the results of the calculation field sort the column of results in a ascending order. All non calculated fields in the query are sortable by using the sort by ascending feature in the design mode.
Best regards,
Dave
View 14 Replies
View Related
Nov 3, 2006
Hi,
I have a database of about 2300 entries and new ones are continually being added. However they are not always in numberical sequence, (eg. 604, 605, 606 etc.) sometimes they will be new revisions on an old number, (eg. 345R3, 604R1 etc)
I have noticed that in Access 2000, when you attempt to sort the numbers in to a numerical sequence, they dont always do it, they will go by the first number (eg. 1, 10, 100, 101 etc) How can i get it to go into a correct sequence (eg. 1, 1R1, 2, 3, 4 etc)??????
View 10 Replies
View Related
Mar 6, 2015
I'm trying to sort and filter a continuous form. Sort ascending and filters works perfectly fine. But my descending button doesn't work. I basically have a combo box which contains a field list. Then two buttons (asc. and desc.), then a text box for filter, a button to filter, and another button to reset filter. Here's my code:
Code:
Private Sub cmdAscending_Click()
If IsNull(Me.cboField) Then
MsgBox "Please choose a field.", vbOKOnly, "No field to sort."
Else
Me.OrderBy = Me.cboField
Me.OrderByOn = True
[Code] ....
View 8 Replies
View Related
May 28, 2012
My question is simple: I've got a database of my book collection. If i view it in a style sheet, it is something like
Author Title etc.
A 0
C 1
B 3
F 2
D 5
D 4
A 8
F 9
I would like to order the Author and Title columns (permanently). Particularly, I would like to order in alphabetical order all the authors and, if I've got the same author, order his/her book alphabetically, something like:
Author Title etc.
A 0
A 8
B 3
C 1
D 4
D 5
F 9
How can I achieve this?
View 5 Replies
View Related
Oct 2, 2005
Hello,
Is their a a way I can have a button or something in which duplicates all the data in the text boxes instead of re-entering data?
Also how can I sort data (DATES) that is in a form in descending order.
Thank you,
Onofrio
View 5 Replies
View Related
Aug 8, 2007
Hi guys,
I got a weird problem. trying to bring back data from my database, i have a query that has worked for the last year perfectly. today, its not. Im asking it to sort via several fields, first is the state, second is the suburb. so what i should (and have) ended up with is a list of states and suburbs in alphabetical order, grouped by state. all of a sudden, W comes before G which comes before A. wtf?
the SQL is quite big as it joins several tables, but the order clause is this:
"ORDER BY States.Description, public_publications.mLocation, public_publications.title, PublishingDays.OrderLevel, [ABC-Circulation].iYear DESC , [ABC-Circulation].AuditPeriod DESC;"
States.Description = Name of state
public_publications.mLocation = suburb
public_publications.title = title of publication
PublishingDays.OrderLevel = special order level (applys only when one publication has more than one entry)
year and auditperiod are the year and the period of the year that the audit takes.
even if i take out all the sorting and leave in "public_publications.mLocation" it still thinks that G comes first, then W, then B, then F etc etc. ARGGGHHGH
is there anything else that effects sorting? this is driving me CRAZY!!!!!!!!
i have compacted and repaired. I have copied the SQL, re-wrote it from scratch, removed all ordering, nothing works.
again i will say that this worked 100% right 3 months ago (last time i used the query) - and i have not changed the query (at least i dont remember doing it, and i have not had a reason to change it). hence why im going insane.
:mad:
SELECT
PublicationTypes.tPublicationType,
[ABC-PublicationSubTypes].tDescription,
public_publications.title,
IIf([Exclusions],'*' & [Issues],[Issues]) AS NumOfIssues,
IIf([ABC-Circulation].[DayPublished]=20,[SpecialPublishingDay],[PublishingDays].[DayPublished]) AS Days_Published,
[ABC-Circulation].CoverPrice,
IIf(IsNull([ABC-Circulation].[CoverPriceDay]),[PublishingDays].[DayPublished],IIf([ABC-Circulation].[CoverPriceDay]=20,[SpecialPublishingDay],PublishingDays_1.DayPublished)) AS CoverPriceDay,
[ABC-Circulation].CoverPrice2,
IIf([ABC-Circulation].[CoverPrice2Day]=20,[SpecialPublishingDay],PublishingDays_2.DayPublished) AS CoverPrice2Day,
[ABC-Circulation].CoverPrice3,
IIf([ABC-Circulation].[CoverPrice3Day]=20,[SpecialPublishingDay],PublishingDays_3.DayPublished) AS CoverPrice3Day,
AuditTypesMaster.AuditType, Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear] AS Period,
IIf([InExcess],[Australia] & "+",[Australia]) AS ANPS,
[ABC-Circulation].inclAccomAirlineSales,
[ABC-Circulation].inclEducationalSales,
[ABC-Circulation].inclEventSales,
[ABC-Circulation].inclMultiplePublicationSales,
IIf([NZInExcess],[NewZealand] & "+",[NewZealand]) AS NewZealandFigures,
IIf([OCInExcess],[OtherCountries] & "+",[OtherCountries]) AS OCFigures,
IIf([exclInExcess],[exclAustraliaOther] & "+",[exclAustraliaOther]) AS exclAUSFigures,
IIf([Exclusions],[ExcludedDates],Null) AS Remarks1,
[ABC-Circulation].BumperIssues,
[ABC-Circulation].BumperIssueDates,
PublishingDays.OrderLevel,
public_publications.mLocation,
public_publications.CompanyID,
States.Description,
PublishingDays.OrderLevel,
[ABC-Circulation].iYear,
[ABC-Circulation].AuditPeriod
FROM ((((AuditTypesMaster
INNER JOIN ((((([ABC-Circulation]
INNER JOIN public_publications ON [ABC-Circulation].PubID = public_publications.Pubid)
LEFT JOIN PublishingDays ON [ABC-Circulation].DayPublished = PublishingDays.lDayIndex)
LEFT JOIN PublishingDays AS PublishingDays_1 ON [ABC-Circulation].CoverPriceDay = PublishingDays_1.lDayIndex)
LEFT JOIN PublishingDays AS PublishingDays_2 ON [ABC-Circulation].CoverPrice2Day = PublishingDays_2.lDayIndex)
LEFT JOIN PublishingDays AS PublishingDays_3 ON [ABC-Circulation].CoverPrice3Day = PublishingDays_3.lDayIndex)
ON AuditTypesMaster.iIndex = [ABC-Circulation].lAuditType)
LEFT JOIN PublicationTypes ON public_publications.lPublicationType = PublicationTypes.lIndex)
LEFT JOIN [ABC-PublicationSubTypes] ON public_publications.lPublicationSubType = [ABC-PublicationSubTypes].lSubTypeIndex)
LEFT JOIN [ABC-AuditPeriods] ON [ABC-Circulation].AuditPeriod = [ABC-AuditPeriods].lAuditPeriodID)
INNER JOIN States
ON public_publications.state = States.StateID
WHERE (((Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear])="Jan to Jun 2007"
Or (Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear])="Jul to Dec 2006"
Or (Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear])="Apr to Jun 2007"
Or (Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear])="Jan to Mar 2007"
Or (Format([dStartDate],"mmm") & " to " & Format([dEndDate],"mmm") & " " & [ABC-Circulation].[iYear])="Oct to Dec 2006")
AND ((public_publications.lPublicationType)=5))
ORDER BY
public_publications.lPublicationType,
States.Description,
public_publications.mLocation,
public_publications.title,
public_publications.CompanyID,
PublishingDays.OrderLevel,
[ABC-Circulation].iYear DESC ,
[ABC-Circulation].AuditPeriod DESC;
View 5 Replies
View Related
Jan 5, 2005
Hello,
I have a simple invoice database with a primary key in the main table (with autonumber as invoice no.) and a subform with the item details which is without a primary key with the data type as numbers. In addition, I had the tables linked as one to many relationship. What happen is that when I am entering the data, the number jumps . For eg: It was suppose to be 7123 but the next entry was 7150. Pls kindly advice.
View 3 Replies
View Related
Jan 4, 2006
Happy new year everyone.
I have a table in which the data input comes from a dropdown list selected in a form combo box as:
contract signed
PIN issued
PDD issued
validation finished
Host country approval
EB approved
CER's issued.
I am designing a report in which I want to display the above list in Ascending or Descending order but as shown rather than alphabetically.
What I mean is no matter how the information is on the table the report showd display it in Ascending as contract signed, PIN issued, etc and in Descending as CER's issued, EB approved, Host country approval , etc.
Any ideas?
Thank you
dfuas
View 6 Replies
View Related
Nov 23, 2006
Hi All hope some one can help with this.
I have a sub for which is set to sort by ascending order for a given field which happens to be a text field with vales set something like abc1.1,abc1.2 ect. The problem is, is that when you get to abc1.10, and more these are then sorted as so
abc1.1
abc1.10
abc1.11
abc1.2
abc1.3
ect
How can I stop this and sort it:
abc1.1
abc1.2
abc1.3
.......
abc1.10
abc1.11
Thanks for any help with this
Paul
View 2 Replies
View Related
Sep 17, 2005
Using a command button what code would be required to get the records on a continuous form to ascend or descend
Jabez
View 4 Replies
View Related
Jan 25, 2015
I have this form for data entry. I want to sort a field in a certain way which is neither ascending nor descending. The items in this field should be ordered as say, C, A, D, B. What I want is a custom order. How can we do it?
The field I am referring to is not on this form, but in the underlying table.
I am thinking of a VB code to achieve this purpose, where I can define the order. But not sure how to do it.
View 5 Replies
View Related
Feb 28, 2013
I would like to do sorting by using one Button like (Toggle Button).In the first click the below code is work good for Descending but in the second click the code doesn't work for Ascending!!
Code:
Private Sub TabItemName_Label_Click()
If [TabItemName_Label] = -1 Then
Me.OrderBy = TabItemName & " DESC"
Me.OrderByOn = True
[code]...
View 7 Replies
View Related
Apr 25, 2006
Hello all,
How can i get the records of a form based on a field ascending order (not the primary key), when i open it?
Thank you in advance.
View 3 Replies
View Related
May 19, 2006
Hello friends,
Please can anyone tell me how i can make the selections in my combo box (combo is bound to column1 of a table) appear in ascending order, by name (column2).
I.e. It's bound by column 1 (with is the Id#), but i want it to appear in ascending by column 2 (Usernames) to make selections easier. Please help :)
View 2 Replies
View Related
Jul 2, 2014
The file was converted from excel. It is in Datasheet view. I select the first column and clip on the Ascending choice under the Home Tab. It works but leaves a large gab of blank rows. I go to the Database Tools tab and check Compact and Repair Database. The file returns to the original unorganized list.
View 1 Replies
View Related
Dec 21, 2014
I have a DB and I have a button that triggers the find and replace. this will search over 100K entries and filter a specific client. The clients record can be 100's of entries.
This all works fine, but its always ascending and I have to scroll to the bottom for the latest record.
I can't set it to show Descending permanently as some employees can't cope with change. so...
I have a checkbox on my form for either Ascending or descending results. Is there any way I can get the find / replace to reference it, Or can I re-sort them after the search.
I've tried putting re-sort code on the 'find' button as lostfocus and mouseup but it doesn't work.
View 6 Replies
View Related
Jun 20, 2013
I am trying to export a data in Excel where a date field is in ascending order
But on displaying i am getting in ascending order but the display is somthing like this:
13/05/2013
13/05/2013
05/10/2013
05/10/2013
05/08/2013
05/08/2013
05/07/2013
05/07/2013
05/06/2013
05/03/2013
05/03/2013
05/02/2013
05/02/2013
30/04/2013
30/04/2013
Date order is misplaced...
View 5 Replies
View Related
Mar 3, 2006
i made a report based on a query. when i run the query, my results are sorted by Job Time Ascending, like i want...
when i made my report i chose job id as the main group priority in the wizard..
now in my report it displays the jobs in ID ascending, rather than Job time ascending as my query says..
i dont want to re-do the report it took ages.. how can i fix this?
View 3 Replies
View Related
Oct 16, 2006
Hi all,
I have a form in Access 2K that properly displays city, state and zip codes. As I type in each letter of a city's name into the combo box, I get the first city in the sorted list displayed (autofills). That's fine when there is only one zip code for a city, but when I enter "chic" for chicago I still get the first chicago zip code in my table.
It sure would be nice if I could do a "sort within a sort" so that if there were two or more records with the same city name then that whole group would drop down so I could choose one of the other zip codes. If this is doable, kindly point me to an example as I need all the help I can get.
Thanks in advance for any responses.
D
View 6 Replies
View Related
Jan 9, 2005
I have a query that sorts players batting averages from highest to lowest. When I run the query just by itself it sorts it right however when I open the report based on that query it does not sort in descending order like I asked. What am I missing??
View 3 Replies
View Related
May 20, 2014
In a query I'm trying to return a list of rows sorted by Service Type Ascending and then the last item in the list should be a row called "Add Edit Value".If I 'ORDER BY 2' then the "Add/Edit" row appears at the top which is not what i want.
My SQL:
SELECT '' As ServiceTypeID, 'ADD/EDIT VALUES' As ServiceType FROM ServiceTypes UNION SELECT ServiceTypes.ServiceTypeID, ServiceTypes.ServiceType FROM ServiceTypes
ORDER BY 1 DESC;
View 5 Replies
View Related
May 30, 2014
What I have is a database setup with multiple tables in which different areas of my DC can input information simultaneously into their respective tables. I then have another database linked to it for myself to have a live view of each updated record. I would like to see all the records of each table in 1 single table (possibly just sorted ascending by time). Each table has the same Field headings but may have different qtys of records. As I will then have it linked to an Excel table to VLOOKUP from it.
I have tried Union coding but always get Syntax Error etc.
View 8 Replies
View Related
Dec 27, 2014
I have a program that runs under access 2007 that I use at my work. We will soon be updating to MS office 2010 and the program will not work now because a calender file .ocx was removed from access 2010. Is there a way to get the 2007 .ocx file to work in access 2010?The program I am using is a relatively simple stand-alone and unsupported app that we use to request patient arrival and departure from various radiology tests inside a hospital. No reports are made from the app other than the number of patient transports for the day.
The app is placed on a common drive accessed from any pc in the hospital. No special permissions are required. But our app does use the calendar, time and date functions in access 2007. When I tried the app on a pc with access 2010, it basically says it (access) cannot open the app because a .ocx file is not present.Is there a way to make the access 2010 calendar file work in access 2007?
View 1 Replies
View Related
Jan 15, 2015
I have an Access 2010 database with two tables and two forms. The tables are Organizations and People. Similarly, the forms are Organizations Entry Form and PeopleEntryForm. The People are linked to the Organizations table. Several people can be linked to the same organization.On my Organizations EntryForm, I created a command button to duplicate a record using the wizard. It works fine.
I did exactly the same thing on the PeopleEntryForm, but instead of copying the record, it creates a new blank record. I don't get any error messages. Is my problem due to the fact that the People table is linked to the Organizations table?
View 13 Replies
View Related
Aug 8, 2005
I was just wondering if it was possible to run a query by a specific value first, then the remainder of the following values in ascending order.
For example, the data would appear in the table as
Smith
Bloggs
Jones
Taylor
What I would like to do is have all the Taylors at the top, followed by Bloggs,Jones then Taylor
I have looked at the OrderBy function, but believe that you can only sort Ascending and Descending
Checked search, cant find anything
Many Thanks
Andy
View 3 Replies
View Related