Sort Data In A Combo Box

Mar 1, 2005

I have a combo box based on a table. The table is sorted by the Customer surname field using the Order By property. My Problem is the combo box will still display data in the unsorted order ie in Primary Key order.

Any suggestions on how I can make the Combo Box display dat in ascending order of Customer.

View Replies


ADVERTISEMENT

Can I Do A Sort Within A Sort On Combo Boxes?

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

Combo Box To Sort Already Sorted List Box

Jun 30, 2005

Ok what I have is a List box with four rows. (Name, Assignment, Location, Description) These are all labeled with a frame at the top that when that frame is selected that row is put into alphabetical order.
The next thing I have is a combo box which also sorts the List box by "major location". The combo box has the following (All, Fort Mills, Corporate, Pequot Lakes, Savage, Retail) When one of those is selected the location row then shows only one of the following locations and the others are removed.
Here is where the problem comes into place. I want to be able to select a major location, then be able to sort with the frame. When I select a major location, and then click on the frame, lets say "Name" the list resets back to everything from that table and not just that certain "Major Location" that I have selected. I need to sort whatever is selected in that "Major Location" by whatever is selected in that frame. thanks for any help, I know its a hard one.

View 2 Replies View Related

Customize The Sort Order Of A Combo Box

Dec 7, 2005

i have a combo box on a payment form which shows existing permit #s. i'd like to make the sort order show the most recently added permit first. i clicked on the build button next to RowSource on the data tab of the properties of the combo box which opens the query my combo box is based on. there are only 3 sort order options...ascending, descending, & not sorted. can this be done?

the permits form has a button to open the payments form (payments can also be opened alone too - ie. if somone applies for a permit today but pays for it tomorrow...). usually this will not be the case but that is why i have to keep it either combo or list.

all help is appreciated.:)

View 3 Replies View Related

Combo Box - Custom Sort Order

May 22, 2014

I have a combo box with the following entries:

Document
Other
Process
Validate
Verify

I want the list sorted so that "Other" is at the bottom. Everything else is alphabetical ascending. Is this possible?

View 4 Replies View Related

Cascading Combo Box - Sort Text Numerically

May 21, 2013

I have a database which is used to search for products by its specifications, i have set up cascading combo boxes to work in the following order.

Profile
Thickness
Width
etc.

So the current row source of one of the Combo boxes is SELECT DISTINCT [tbltestv2].[Thickness] FROM tbltestv2 WHERE ((([tbltestv2].[profile])=(Forms]![Run ratev2]!cboprofile]))

This basically means that it will search for whatever thicknesses are available in the selected profile.This is the one that works fine although it is not sorted numerically. I.e 1, 1.2, 12, 2, 2.5 where I want it as 1, 1.2, 2, 2.5, 12

From here I amended the order by so that it will sort it numerically, In the row source I had the following expression.SELECT [tbltestv2].[Thickness] FROM tbltestv2 WHERE ((([tbltestv2].[Profile])=[Forms]![run ratev2]![cboprofile])) ORDER BY Val([Thickness]), IIf(Val(Right$([Thickness],1)) =0,Right$ ([Thickness ],1),""); The issue with this one is that it shows duplicate data for instance 1, 1, 1, 1.2, 1.2, 2.5, 2.5, 12, 12, 12

I know that if the beginning of the expression is SELECT DISTINCT it will eliminate this however, the SELECT DISTINCT is conflicting with the ORDER BY and it will not let me do it.

View 4 Replies View Related

Two Combo Selection Boxes: Sort Order Problem

Jun 22, 2005

I have a form that house two record selection combo boxes, one for Customer Name and one for the Tracking number.

Both work as intended and return the correct record.

The problem is with the sort- I used a query for the source. That query will allow either the tracking number to be the sorted order OR the Customer name to be the sorted order.

I need code to make the sort order in the combo boxes on the fly, depending on which combo box the user selects.

Will you tell me how you would handle this?

Thanks, in advance-

View 2 Replies View Related

Multiple Combo / List Boxes - Sort Based On Entries

Sep 23, 2013

I am trying to put together a form where employees will be entering maintenance information into my database. One of the requirements for this data is that when they perform repair work on an asset, they have to list a problem, cause and remedy. These are codes that are specific to each asset.

The closest thing I can think of to what I am trying to acheive is the selectors on car search websites. You select a MAKE, and then the MODEL list is narrowed down based on that, then you pick the TRIM, which is narrowed down based on the model selection. I have an Excel spreadsheet of the Assets(Failure Class), Problems, Causes, and Remedies...I'm just not sure how to put this into Access to get the desired output. I have attached a sample of the Excel spreadsheet for illustration.

I believe I'm going to have to put each of the columns in a seperate table and use relationships..but I'm not sure about that.

View 2 Replies View Related

Text Box Filling In After Combo Box Selected - Need To Sort On Split Form

Apr 23, 2014

I have a table [Employees] that has the field [FirstName] and [LastName]. On my form [Jobs], I have a combobox [ComboWho]. The combo box has all of the possible first names. When a first name is picked, it makes the last name fill in a textbox.

In the real version, it is a [LastName] is a lot of information, so it is kept in a memo field. I tried to use cascading combo boxes, but it cuts off my text.

I keep getting it to almost work... I've tried about 5 different methods... DLookUp, subform, etc.

Right now, I'm using this code:

Private Sub ComboWho_Change()
Dim location As String
Me.ComboWho.SetFocus
location = DLookup("LastName", "Employee", "FirstName = '" & Me.ComboWho.SelText & "'")
Me.MyTextBox.SetFocus
Me.MyTextBox.Text = location
End Sub

It has properly filled in the textbox. I thought it was working perfectly, but ran into one snag... We have been using a split form... and it won't let me filter that column (Column ComboWho). I think because it is saving everything as numbers instead of text.

ComboWhoDatabase.accdbI've attached a copy of the simplified database.

View 5 Replies View Related

Queries :: Sort Out Invoices By Year - Query Based On Combo Box To Show All Records

Mar 4, 2015

I am trying to have a query sort out my invoices by year but also to have the possibility to show all invoices.

I have one table "INVOICE" where I have a column "YEAR" calculated with DatePart function from the invoice date.

On my form "INVOICE LISTING", I want to have a combox "Combo957" selecting the year. I have forced the "ALL" selection to the combox using a UnionQuery.

My problem, I cannot get the query to work. I have tried many ways, the closest I can get is :

IIf([Forms]![Invoice Listing]![Combo957]="ALL",([Invoice].[Year])<Year(Date()),[Forms]![Invoice Listing]![Combo957])

If I select the year from the combo, it works, if I select "ALL" nothing is shown.

here is the full SQL

SELECT DISTINCTROW Companies.Company, Companies.City, Companies.Country, Sales.Brand, Sales.Type, Sales.Date, Sales.QuoteNo, Sales.Delivered, Sales.Account, Sales.Branch, Invoice.InvoiceNumber, Invoice.InvoiceDate, Invoice.CustOrderNumber, Invoice.PaymentTerms, Invoice.DueDate, Invoice.NetAmount, Invoice.TotalAmount, Invoice.Tax, Invoice.PaiementRCVD, Invoice.Overdue, Invoice.Month, Year([Invoice]![DueDate]) AS DueYear, [Invoice]![month] & " - " & [Invoice]![Year] AS InvoiceMonth

[Code] .....

View 5 Replies View Related

Help - Need A Way To Sort Data Effectively

Aug 15, 2006

Hi,

I am currently implementing a stock control database in access. I have various forms for entering stock in and taking it out etc. It all works fine except I need a way of sorting my data to produce very specific reports. The company wants reports to be listed in a very specific order. I have many fields with which I have to sort the data so it has proved a very time consuming problem.

I have tried the custom sort order techniques involving the switch function, however due to the large extent of data in use this approach has limited success.

I have also tried merely applying numbers to the front of a stock item to sort it, however this is a very basic approach and means the user has to look at random numbers before actually reading the stock item in reports.

One approach that could work would be to have a sort order as a separate field. But the user would have to then enter a sort order number each time data is entered(?).

Does anyone have any ideas as to how to solve this problem?

Apologies for the length of this post!

Cheers
Turbojohn

View 1 Replies View Related

Sort Data On My Form

Aug 31, 2005

When I open my form the data are sorted through the ID, How can I change that to be sorted through the Year? On my form properties is that the Filter is responsible for sorting?

View 5 Replies View Related

Allow User To Sort Data

May 10, 2006

Hello everyone

One of my forms has a load of data displayed in it from a query and I would like to allow the user to sort this data by means of some buttons next to each column heading. For instance clicking 'up' next to first name / last name etc will sort ascending on first name, 'down' will sort descending etc. I tried setting up different queries for each sort and changing the record source of the form in the on click event but then the controls don't seem to know where to populate from!!

Can anyone help with what I should be doing?

Thanks

View 2 Replies View Related

General :: How To Sort Raw Data

Feb 21, 2013

I need to create a absenteeism database for work . I have attached a sample data for you to see how my table is in access.

so the fields that i have are name, team leader, date, code, department, minutes.

from this raw data I need:

1) a high level summary report that groups all ccps by team leader and how many hours the team leader has and each individual ccp.

2) summarize by code the hours each ccp has and also occurence. if the ccp has been sick 3 days in a row then it is considered 1 occurence. if they have been sick multiple days but are not concurrent then each one is an occurence so i need that info categorized by month and tl.

3) a form where the user can pick what codes they want to see from a check box / list box (which one would be better?) and group those codes by ccp and team leader month over month.

View 13 Replies View Related

Sort (order) Data On Forms

Apr 12, 2005

Hello,

This is related to "Old_value, new_value" thread I posted yestarday (Module&VBA).

I have a problem i missed yestarday. The code it's vorking great, but it allways takes the showed new_value and makes it old_value for the new record, and this is a problem, because the showed record is not the last for that customer.
So, I was thinking that if I make a new Autonumber field in my table, I could sort descending the values and this way the input form will allways show me the last entered data for that person.
As I noticed from a long time ago, if I sort a table that allready has a form, the form won't show the records sorted. Why? It's necessary to make the form again? I tried to order the data on the form from Properties window ->Data->Order by, but the ordering is Ascending and I need it Descending!
Can enybody help me?

Thanx,
Attila

View 1 Replies View Related

Sort & Data Type Mismatch

Dec 20, 2004

Hi. I was doing a simple query that resulted in a "data type mismatch in criteria expression" error. Hunting around for the source I realized that when I attempt to sort a column of numerical data a hidden decimal point is inserted and what should be an order of : 45, 10, 9, 2, becomes this order: 9, 45, 2, 10 (i.e., 9, 4.5, 2, 1.0)

Does anyone know what has happened?

moondog

View 1 Replies View Related

Exporting Data With A Custom Sort Order

Jun 7, 2007

Hi,

I have a Form which contains a datasheet and I have some code which allows users to custom sort this datasheet. Another table based on this datasheet is then exported as a csv file.
However, the data is obviously not exported in the same order as the datasheet and it is quite critical for the application to be a sucess that it is exported in the custom order chosen by the user.

I have done some re-search, searching groups, forums etc and found the solution of having a 'sort column' in the table the datasheet relates to, I can then use this in the query that exports the data. My only problem with this is I had to manually fill in this sort column in the datasheet, once I had decided upon my final sort order. Is there anyway to fill this column automatically based on a row's position in a datasheet?

Many thanks in advance

View 4 Replies View Related

User Input Data In Table Using Form - Sort By Month

Mar 28, 2013

I have a table with product numbers and their cost. That table has 3 fields : SKU, Cost, Month. (The cost can change every month, therefore the list is built to have a cost / month)

I want the user to be able to input the data in the table using the form but I would like the form to be sorted Alphanumerically for the SKU numbers and then per month (in their normal order not alphanumerically).

I have a combobox (named month for testing purposes) to force the user to select one of the 12 months and the field type is Text.

Also I am unsure how to "autosort" (or apply a permanent sort) the form whenever it's opened. Will it be applied if I just set the sort and then restrict the user from seeing let's see design mode?

View 4 Replies View Related

Forms :: Sort Of Limit On Number Of Columns Contained In Data Source For Such A Box?

Jul 14, 2014

I have a form I created in the past that auto-fills some of its fields based on the user's selection of a record from a combo box linked to another table. The form has been working perfectly however I recently tried to add a couple of more fields to the form that need to be autofilled. I added the new fields to the source table and added columns to the combobox that should allow my VB code to fill those boxes. However only one of the new fields is filling correctly. After trying a few different things I notice that the problem seems to be with whatever data field becomes the 21st column in the combobox. Is there some sort of limit on the number of columns contained in the data source for such a box?

Option Compare Database
Private Sub EmpIDAutofill_Change()
Me.EmployerCatAutofill.Value = Me.EmpIDAutofill.Column(1)
Me.StreetNumAutofill.Value = Me.EmpIDAutofill.Column(2)
Me.JobCityAutofill.Value = Me.EmpIDAutofill.Column(3)

[code]...

View 3 Replies View Related

Forms :: Form That Shows 100 Records At A Time - Filter / Sort Data Source Entirely

Oct 20, 2014

The recordsource is a query with over 6,000 records. The form currently lists the records in datasheet format with header and footer for things like buttons and filtering. The client wants to be able to go from page to page of the souce query, showing 100 records on the form at a time.

But at the same time, they should be able to filter or sort the data source in it's entirety. The person who created the form came up with what seems like an awful solution to the problem. It seems to use a random number generator to determine how many records to portray at a time. I see this in the code as well as in operation, because the number of records on page to page varies. It doesn't even start out at 100! Worse yet, using a sort on the page only sorts the records that are visible.

View 9 Replies View Related

Report Sort Different From Query Sort

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

Report Sort Is Not The Same As Query Sort...

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

Populating Combo Box Based On Data In Another Combo Box

Jan 23, 2006

Hi all!

It's been a while since I've used Access, and I seem to have forgotten this.

I have a form which allows entry of Borrower's details. I have 2 combo boxes on the form.

They are:

cboBorrName
cboLoanSN

Once the user selects the name from the cboBorrName, I want the cboLoanSN to display all loans associated with the Borrower so that they can select the correct loan and add repayment details accordingly.

I have added the following SQL statement as the record source of cboLoanSN

Code:SELECT * from tblBorrower WHERE tblBorrower.fldLoanSN=[Forms]![frmBorrower]![cboBorrName]

I have also added the following code in the After Update event of cboBorrName

Code:Me.cboLoanSN.Requery

However, it doesn't work.

Can someone please help me out?

Thanks a bunch!

View 6 Replies View Related

Add Data Via Combo Box?

Mar 23, 2007

If I have a drop down box with names in, is it possible when I select a name from the list (drop down box) that it will fill in data related to that name into several fields on my form, the data from the names will be on a form that is closed.???
Chris

View 4 Replies View Related

Transfer Of Data From Combo Box

Nov 4, 2005

Hi Guys,

Ok, all i want to do is that when i select a value from my combo box to be displayed in a text box, once its been selected, the value is then deleted from the combo box, any ideas????

View 3 Replies View Related

Combo Box Rewrites My Data!!

May 10, 2005

I have an ADP project setup that's links to a sql server 2000 database.
I have two tables - Missionaries and Boards.
They are linked in a one-to-many relationship (one Board per Missionary, many Missionaries per Board).
I am running a form that is based on a view (FullView). FullView contains the fields from Boards and from Missionaries. I want my form to have a combo box that draws the Board names from Boards (not from FullView, because sometimes not all the Boards will be assigned to a Missionary).


However, when I setup my source for the combo box to be:

SELECT BoardID, BoardName FROM Boards ORDER BY BoardName

and set my "Bind Column" to 1, then I go to form view and select a board from the list and move to the next record, my BoardName value is rewritten with the BoardID value.

Am I making any sense? Can anyone help?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved