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 Replies


ADVERTISEMENT

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

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

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 3 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

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

Sort By A Value

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

Re-sort

Mar 25, 2007

Hi,

I try to do something but I don't know how.
I have 1 table with 3 rows (title, year, genre) and 1 Form.
Is it possible to create combobox or something with 3 criterium, when I selected
criterium to re-sort columns in Forms (by title, by year, by genre)?

thank you

View 2 Replies View Related

Sort Asc / Dec

Jan 13, 2006

Continuous form:
The standard menu / toolbar commands sort ASC and DEC work just fine.
However, if I define a button with the VBCode
"DoCmd.RunCommand acCmdSortAscending", I get an alarm message pop-up
saying "the command or action "SortAscending" isn't available now".
I made sure that the standard menu items "Sort asc / dec" are not grayed out(disabled) at the time I click the button in runtime. The mouse cursor points to the desired sort criteria field.

Any advice?

Regards from Belgium (pretty cold here)

View 2 Replies View Related

How To Sort By IP Address

Aug 29, 2005

I am completely stumped on this one. I have a database where we track IP Addresses and I just want to sort by IP...should be simple, I'd think.

With these 5 IP's, I'd want them in this order:
1.2.3.1
1.2.3.4
1.2.3.7
1.2.3.9
1.2.3.10
1.2.3.17
1.2.3.21

But it sorts in this order:
1.2.3.1
1.2.3.10
1.2.3.17
1.2.3.21
1.2.3.4
1.2.3.7
1.2.3.9

Is there anything I can do to fix this? I want it to see each number as a whole, for example "10" instead of "1" and "0"

Much thanks.

View 5 Replies View Related

Sort Order

Oct 10, 2005

How do you change a file's sort order from ascii to international?

View 3 Replies View Related

Sort Table

Dec 22, 2005

Hello all...
I have a table which includes month, day & date. I want to sort this table by day, and then by month & then by year... does anyone know how to do this?

Thank you...:)

View 4 Replies View Related

Help Newbie Sort Out His DB

Jan 16, 2006

Hello all

Been looking at this forum for a few weeks and think it's great!!

Now for my first post :rolleyes:

We have a DB at work (attached) and it was put together by a consultant would you believe. Anyway I have been given the task to fix this. It now work i.e. it records what I want. The only problem is that it's written with more macros than i've ever seen.

I want some advice on the DB to make it function better. It is used to record how long a member of staff spend on a piece of work, apologies for the interface.

1. The user must first input a date , start date and end date into a table. Now the start date will always be a Monday and the end date a Sunday. Is there anyway to automate that process? i.e if a user goes in on a Monday the prevous weeks date is there but if the user went in before it would not , get the idea.

Anyway, please rip it to shreads and give me some advice

Thanks

View 11 Replies View Related

Auto Sort Anyone

Jan 25, 2006

I have a table already set up in a Subform of a main form

The Table has values like
-Date
-Time
-Name
-SchBy

I want to have the subforms table to automatically re-sort ascending by Time, how would I go about doing this so the user doesn't have to click the field then sort ascending button...?:confused:

View 1 Replies View Related

Hello, Sort Anoob Here

Oct 17, 2006

hello ladies and gents!
I've been kind of lurking around.
I love this site! thanks for having me :)

View 1 Replies View Related

Sort Negative First

Jan 15, 2007

When i sort values, for some reason the negatives are at the top, followed by the highest positive values. Anyway to turn this off?
Tried google and searching these forums.

View 5 Replies View Related

MDB To TXT Looses Sort

Dec 9, 2007

Hi all.
I imported a text file into a new table.
I sorted the table on one field, then exported table to another text file.
But, the sort did not export. The new text file has the same sort as the original.
What am I doing wrong?
Thanks.

View 3 Replies View Related

Sort Date

Dec 13, 2007

Hey all, I looked throught a couple of threads for sorting, but could not find exactly what I need.

Basically, I have a list of dates:

10-Aug-07
20-Oct-07
13-Nov-07
etc...

and when I try and sort these dates from earliest to latest, it only reads the number and not the month, like:

10-Aug-07
13-Nov-07
20-Oct-07
etc...

How would I make it sort by date and month?

Thanks,
RR

View 4 Replies View Related

Sort By Month

Jun 21, 2005

Hello, I have the following query which gives me a count by day.

However, it sorts by day instead of day/month.
For example:

01/01/05
01/02/05
01/03/05
02/01/05
02/02/05 and so on...

Can I sort so it will show me all of January, then all of Febuary etc?

Thanks.

J.

View 5 Replies View Related

Sort By First 2 Digits Only

Jan 19, 2006

Open the database – then open the Report: rep_Billing

I have a query that is doing some sort and count functions. The column [TYPE] is sorted then counted. Instead of sorting by the full name can the query sort based off of the first 2 characters?

Example:
On the report the first company is: AMERICAN POSTCARDS

First it separates the colors, which is good.
Then separates the [TYPE] then counts the total amount that color was that type.
However I do not want the full type to be separated out, I want it based on the first 2 characters so that the “N-“ will all stay together as a group.

Final count should say: AMERICAN POSTCARDS
GREEN RA 3
RED N- 14
RED PR 16
RED RA 12
BLUE NC 1

I know I can get this info from the report, but it has to be done at the query level because it is going to be exported into another system at that point. Thanks.

Let me know if I need to make this clearer. Thank you all.

Travis

View 2 Replies View Related







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