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 Replies
ADVERTISEMENT
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
Sep 27, 2012
I have a list of 22 soccer players with their weights sorted from heaviest to lightest in numerical order. I want to add further players and have the list reflect their standing each time it changes i.e. Col 1 Player ID, Col2 FirstName, Col 2 SecondName, Col 3 Mass:90 Kgs Col 4 Position In group: 1
A new player registers and is 95Kg.....he becomes #1 and the rest go down etc. Can this be done?
View 6 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
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
Jun 30, 2006
Hello there!
This is my very first post on this forum. I started to work with Acces and SQL only two weeks ago, so my questions probably are newbie-stuff, but please bare with me and please help me anyway :-)
In my form I've inserted a list that shows data from one of my tables. The posts are ordered by 'ID' (and I know how to change this). But I want to make a button just right of it, that, when it's clicked, sorts the list by 'first name' instead.
How do I make such one???
// John
View 3 Replies
View Related
Aug 8, 2013
When I "Add Existing Fields" I'd like the list to be sorted alphabetically...how to do this?
View 4 Replies
View Related
Sep 15, 2006
I need to manage a list of, in this case "medications", with this list the most common "meds" are on the top of the list. there will be at times new "meds" added that should be at the top of the list. I want to create a unbound box that will let me drag the "meds" up or down in the list. The best emample i know of is the way you can set the "Tab" fields on a form to move the tabs stops.
View 4 Replies
View Related
Apr 14, 2015
I have a form named "frmItems" with a list box in it called "lstItems"
I would like to create a find (or search) button for it, but how? I also have a search box called "txtSearchI" ...
View 14 Replies
View Related
Aug 3, 2007
Data in table “tblEmployees”:
EmpName GroupNum
Jon Group1
Sam Group2
Tom Group1
Bob Group1
Hal Group2
Dan Group3
Cal Group2
With sample table above, can I write a query in Access that lists the data by GroupNum based on my criteria, say Group2 1st, then Group3, then Group1? Basically, how do I make the result show:
Sam Group2
Hal Group2
Cal Group2
Dan Group3
Jon Group1
Tom Group1
Bob Group1
View 3 Replies
View Related
Jun 29, 2006
Ok, I am a noob at reports and did a search on this. My searching DID NOT HELP ME! I thought I would make that clear :D Maybe someone can tell me what to look at for this issue.
I need to take one report, allow the users to easily use a dropdown or listbox on a form to Sort and Group many fields of data. To recap: The user will click on name in the list and it will sort report by name. Also I need them to be able to select up to three sort criterias.
EX: Sort by Name then LastName then Company
Please guide me to the answer. Thanks.
View 3 Replies
View Related
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
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
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
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
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
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
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
Jan 10, 2006
Hi All,
Just a quick enquiry if I sort a query by a date field in ascending order then select unique records will I get the latest records.
Thank You
View 1 Replies
View Related
Jan 26, 2006
Hi,
Possibly related to my other problem, (see other post on queries page).
After running a query that looks at multiple tables I get a record set of, say, 560 hits.
To view the data in a useful way, I select one column or another to sort ascending or descending, no filter.
The record set returned after the sort is often smaller, say 350. As far as I have been able to tell, the records dropped and the records remaining are functionally the same and should all still be there.
Any ideas why the query might be doing one (or more!) of the following:
a) Returning too many records, the excess get dropped when sorted?
b) The sort is removing records that should be included
c) Access is applying a filter that I have not instructed it to do so
PS. I did try to analyze the difference between the results of this one time but got side tracked into creating a new query from scratch that seemed to work properly.
Regards,
Keith.
View 1 Replies
View Related
Jun 9, 2006
Hi guys, I need a little help on next record stuff...:eek:
Can someone please explain how I can make my database actually go to the "Next" record after I update the "LName" field on my form? My database is sorted on "LName". After I update the "LName" field and save the record, the sort order is messed up. If I requery the form in the sub routine, the database goes to the first record. I need it to go to the "Next" record (the one that would have actually come next before I changed the LName). For example, if my database contains these names:
Baker
Doe
Franklin
Goodwin
Johnson
Jones
Smith
Taylor
and I change the current record's LName from Franklin to Phranklin, I expect the database to go to Goodwin (the record that would have followed Franklin) after pressing my next record command button. Likewise, if I changed Phranklin to Franklin, I expect the database to go to Smith (the record that would have followed Phranklin) after pressing my next record command button.
I've tried different versions of FINDFIRST on this site, but can't get it to work. I would like to find the next record based on my key field (autonumber) named "rec_id".
Thanks, and luv ya in advance!
-carol
http://profiles.yahoo.com/c_coop2005;)
View 14 Replies
View Related
Mar 4, 2013
I've just begun using microsoft access and would like to create a primary key on a table of data that has been sorted alphabetically. However, when I try to create this key (designview -> auto number-> increment) it autonumbers for the column the way it was before i sorted it. Is there a known way of doing this?
View 7 Replies
View Related
Jul 10, 2006
I have a client table with a field called location. On a reports form that I have, I want to make a combobox for all of the locations, so it could show all the clients from a particular location and also it would reduce the errors due to someone spelling a place name wrong. I could set the source to the location field in the table, but that would show them all in the order they come out and there would be duplicates.
Any help would be cool. Cheers
Bob
View 1 Replies
View Related
Sep 23, 2013
I have written a query where it displays sorted data for two columns, but problem is its sorting on one column but not on another.
When checking the query separately its giving proper output, but in form view its sorting only on one column not on another.
View 1 Replies
View Related
Feb 20, 2014
I have a form that contains a combobox. I want the default value for this combobox to be the Staff_ID of the first forename to appear in a table when sorted alphabetically.
The table I'm querying is called 'Staff'. Fields within are 'Staff_ID', 'Forename', 'Surname'. The table is sorted by 'Forename' in ascending order.
From the example tables below I would expect to return a value of '3' for example 1 and '9' for example 2.
Example 1
Staff_ID Forename Surname
3 Andrew Banks
7 John Jacobs
2 Mark Jones
8 David Smith
Example 2
Staff_ID Forename Surname
9 Alice Jones
3 Andrew Banks
7 John Jacobs
2 Mark Jones
8 David Smith
I'm using Access 2007
View 9 Replies
View Related
May 11, 2015
How do i create a report that is linked to my sub-form that i have just sorted in a different form? let's say i have a form named View Records and on that form i have added a subform that is linked to my Employee Table, and then on that View records form i have added a few combo box in order to sort the data on my subform on that form, now what i want to do is that, i want to link those data that i just sorted on my subform and transfer it to a report.
View 5 Replies
View Related