Forms :: Get Unique Values In Combo Box Search?
Dec 3, 2013
I have built a database that is fed from tables provided from outside computer systems, so the architecture isn't exactly how I would design it.
I am trying to use a combo box on a form to quickly jump to a specific department. I have about 130 personnel that are assigned to 10 different departments. I have to use a subform to update the position info vs. the personal info.
The combo box works, but I can't get it to display each department once. It shows the department 130 times for each employee instead of 10 unique departments.
View Replies
ADVERTISEMENT
Jul 22, 2014
I've used this guide [URL] .... to only show unique values in a combo box. I can't get it to work, it just shows a load of blank values. If I run the expression builder part from the background, it works but it doesn't work in the combo box. Not sure what I can post to give more details?
View 13 Replies
View Related
Nov 23, 2006
Is it possible to create a combo box to list all record ID, when selected that record appears on the form?Ifso how would i go about this?
Thanks in advance?
Andrew
View 1 Replies
View Related
May 7, 2013
I have a search combo box to search for a field on my form. But it just goes to that particular record. The combo box is for client id and it has more than one record. How can I have it return just the records pertaining to the client id choosen in the combo box.
View 5 Replies
View Related
Dec 5, 2014
I have the following dataset in a table called NR_PVO_120. How do i pick out a number (which can change but let's say, 6) of UNIQUE OtherIDs without excluding any OtherIDs under any fax numbers?
So, if you pick OtherID from Row7 you then also must pick OtherIDs from rows 8 and 9 because they have the same fax number. Basically, once you pick an OtherID you're then obligated to pick all OtherIDs that have the same fax number as the one you picked.
If the number requested (6 for this example) isn't possible then "the closest number possible but not exceeding" would be the rule.
For example, if you take OtherIDs from rows 1-10 you will get 6 unique OtherIDs but row 10 shares a fax with rows 11 and 12. You either need to take all 3 (but that will raise the unique count to 8, which isn't acceptable) or skip this OtherID and find one with a fax that has no other OtherIDs and that isn't on the result set already. My result of 6 UNIQUE OtherIDs will need to contain ALL OtherIDs under any fax the existing OtherIDs are connected to.
So one solution is to take rows 1-6, 26. Another is to take rows 1-4,10-14.
There will be many possibilities (the real dataset has tens of thousands of rows and the number of people requested will be around 10K), as long all OtherIDs connected to all faxes on the result set are part of the requested number (6 in this case) any combination would do.
A few notes.
1.Getting as close as possible to the requested number is a requirement.
2.Some OtherIDs will have a blank fax, they should only be included as a last resort (not enough OtherIDs for the requested number).
my table (NR_PVO_120)
Row OtherID Fax
1 11098554 2063504752
2 56200936 2080906666
3 11098554 7182160901
4 25138850 7182160901
5 56148974 7182232046
6 56530104 7182234134
[code]....
A few sample outputs
one solution is taking rows 1-6 and 26.
OtherID
11098554
56200936
25138850
56148974
56530104
56148975
Another solution is taking rows 1-4 and 10-14.
OtherID
11098554
56200936
25138850
56024315
56115247
56148974
This is for a fax campaign, we need to make sure no fax number is faxed twice, that all people connected to that fax number are contacted under one fax sent.
View 12 Replies
View Related
Aug 5, 2013
I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.
Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...
View 1 Replies
View Related
Feb 7, 2014
i have one table in which ID is Primary ID with Different Values
Like
ID NAME PAN
1 A X
1 B Y
1 A X
2 C Z
2 C G
3 D U
it shows that ID 1 having 2 Name (A& B,with PAN, X & Y ,respectively).how can i get this that ID having More than 1 Value like 1 and how can i select only these records ID which having more than 1 value and how can i update values for 1 ID.
View 8 Replies
View Related
Jun 25, 2013
I have a main form that filters data in a subform based on selections via combo box users make on the main form.
So I have the 'department' and 'manager's name'. If someone selects 'Human Resources' from 'department' combo box, then I only want to see the managers that are in the Human Resources departement when I drop down the combo box for 'manager's name'. Currently I'm seeing all the managers and a user can select a manager that is not in human resources and get no data returned. I prefer for him to get a list of those that are in that department only. The source of the combo box is a query.
I got it! Found here: [URL] ....
View 3 Replies
View Related
May 13, 2014
So I'm working on something for housing. Each house has a "Property Reference". This property reference links to all other information on the property.
There's two tables, Referral (For a tenant, with the Property Reference as a foreign key) and PropertyInfo (Holding all the property information)
Basically I want to save users as much input time as possible, so I'd prefer if they could just enter the property reference for a person, and that populates the rest of the table.
I'm currently using DLookup on the main form where it displays the information related to the property reference, obviously it's not actually being saved into any fields.
Will this method be okay if I would want to search the records by the address on the main form?
View 9 Replies
View Related
Apr 21, 2013
I have a table in which there are approximately 15k records. The name field has approximately 2500 unique values. I need to search the table for multiple names and return the results from the table. This would then be used as a report. Due to the users being very novice, a form is needed for the search.
Example:
Search for Smith, John; Wilson, Bill; Jones, Jeff
Return
Name Year Brand Make
Smith, John 1999 Oldsmobile 88
Smith, John 2001 Chrysler 300s
Wilson, Bill 1994 Porsche Carrera
Wilson, Bill 2007 Kia Sporty
Jones, Jeff 2004 Chevrolet Camaro
Jones, Jeff 2011 Chevrolet Impala
My knowledge of forms is basic, however, I can be a quick learner if on the right track.
View 1 Replies
View Related
Dec 21, 2005
Hi Guys. I currently have a search function via accountno on my form, once the account num is typed in and entered it will display the record of that account num, here is the code:
Sub Combo64_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[AccountNo] = '" & Me![Combo64] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
I also now need the same function for the ID, but not sure how to do it. thanks.
Mosh
View 2 Replies
View Related
Sep 16, 2013
I'd like to search a combo box on a subform for a string containing a (or multiple) '?' on click of a command button. The point of this is to inhibit the submission of a record with ????? as a field value (in a combo box), however it is temporarily allowed before submission of the form.
I tried this on the command button and it didn't work:
If Me!Subform.Combobox.SelText = "?" Then
MsgBox("Error")
End If
I think I am referencing the combo box on the subform incorrectly..
View 5 Replies
View Related
Jun 27, 2013
As an example lets say I have a table listing some cars:
Car Make Car Model
Ford Fiesta
Ford Focus
Ford GT
Mercades C Class
Mercades E Class
Mercades A Class
I am making a form with two combo drop downs with the ability to select car make or model.
Car Model is Unique so if the car model is entered, I will force the car Make into the other combo box
however, If i select "Mercades" for example in the car make, I would like the combo box of Car model to only be filled with the possible models that Mercades make.
Is this possible? (to search for the values available in Car Model based on the value entered in Car Make?)
View 1 Replies
View Related
Sep 29, 2014
The idea is populate the 2 Comboboxes and year and after that query something like:
Code:
SELECT FileEntryNo, GroupCode, SubGrpName, SubGrpNo, FileNo, GroupName, Subject, NameTo, NameFrom, ConnectedFile, DocumentDate, Month,
Spelmonth, Year, Reference
FROM dbo.Files
WHERE (GroupCode LIKE 'XXX') AND (SubGrpName LIKE 'YYY') AND (Year = ZZZ)
So after the query is executed the results will be available on a third Combobox that after selecting a record will show the detail on the fields.
View 2 Replies
View Related
Jun 14, 2015
I used the Contacts demo on Access 2010, made all the elements Client from web based and then exported to a new database. It worked for the most part but now I am trying to put in a 4 box search and am getting stuck on which form to link it to and also where to put these boxes.
View 1 Replies
View Related
Aug 6, 2013
I have a combobox on a form that lets the user select a business name which then populates the rest of the fields in the form appropriately. But when it does this it makes it so that the seach function at the bottom of the screen no longer works, as it only has the selected record as an option. So before selecting a name from the drop down list at the bottom of the screen is says "Record: 1 of 5" but after selecting the name it become "Record: 1 of 1." Is there anyway to still allow the built-in search function to work alongside using a combobox?
View 8 Replies
View Related
Jan 19, 2014
I have a combo box that brings up records for an individual. I have people with the same last names and have their first names showing on the combo box list, but when i choose one of them, it will always go to the name of the person who was entered first, so matter who i pick(that has the same last name).
View 1 Replies
View Related
Mar 1, 2007
I have a query that has an Item, ItemPrice, Allocation, and DatePurchased ordered by DatePurchased with only unique values.
I'm using it for a PO Database, when entering items purchased, I have the Item field populated with a items previously purchased, when the item is selected the Unit Price and Allocation Fields are autofilled in with the most recent values from the PO details table.
My problem is if I purchase 10 of the same Items on 10 different dates then the combo box will show 10 of the same Items, because they are not unique values because of the DatePurchased.
What I want is a query to show one unique Item entry with the most recent Purchase Price. I can get a list of unique Items, by only making a query of those and showing only unique values, but as soon as the date is introduced it no longer works, for obvious reasons.
Any help appreciated,
JOe K.
View 1 Replies
View Related
Jan 15, 2008
I have a database to track client activity per session.
Each client has a unique client number but multiple activities.
Therefore, if I have 20 clients in the database and each has 3 activities, I have 60 client numbers, 3 *20 = 60. ( Duplicated)
My elementary problem is how do I display the client activity unduplicated so that my query returns only 1 unique client number per session.
I tried the unique records/values in the property box but still.....
Thanks for your help.
View 1 Replies
View Related
Jul 23, 2015
I recently created a database to be used to store incoming invoices. We have 4 suppliers which supply the same material and wanted each supplier to have its own database.
I began by making a database which included all the key tables, forms, queries and functions I would need to then save 4 copies, one for each supplier. This just meant I would not have to repeat the process for each individual supplier.
The problem is all my data is external and upon importing it into the database it has made the search function (combo box) not return results.
I believe this is because:
1) The form was created before the records existed
2) The records were imported from an external source and not created using the form.
However, the way I have designed the form is so I can see all relevant information linked with a specific invoice. This aids in gathering information quickly about an invoice but also so I can input credit note and invoice query information linked to a specific invoice on the same page.
Is there anyway to remedy this?
Or use a similar search function that returns records in my form "Main View"
The last thing I want to do is have to create the form again, although I don't think this will work either as reason 2) states.
View 14 Replies
View Related
May 1, 2013
I would like to have 5 combo boxes from which users can choose fields to search, e.g.
cbo1 - choose YEAR, TYPE, LOCATION, COST, COLOUR, SIZE
cbo2 - choose YEAR, TYPE, LOCATION, COST, COLOUR, SIZE
cbo3 - choose YEAR, TYPE, LOCATION, COST, COLOUR, SIZE
cbo4 - choose YEAR, TYPE, LOCATION, COST, COLOUR, SIZE
cbo5 - choose YEAR, TYPE, LOCATION, COST, COLOUR, SIZE
criteria are stored in txtbox1, txtbox 2 etc. so the search string could be
WHERE cbo1 = txtbox1 AND cbo2 = txtbox2 etc.
If the user doesn't choose anything for a combo, the search should ignore that field.
View 6 Replies
View Related
Jun 16, 2014
I have added a combobox to one of the forms in my customer database using the "find a record in my form based on a value in my combobox" section of the combobox wizard.I have a number of columns in the combobox (the primary key is the bound value, and I have unbound columns for first name, surname etc).
I sorted the records in the combobox by column 3 (surname) so I can scroll through the list and choose surname instead of having to memorise customer numbers. Now I have more than 1500 records (with more on the way), scrolling through takes ages, and I was wondering if there is a way to adapt the combobox so I can (for example) type the first letter of a surname into the box and be taken to surnames beginning with that letter, whilst retaining the primary key as my bound column?
My initial thought was to base the combobox values on a query, and make the query prompt for a starting letter (or string of letters) each time it runs, so it only displays the query results in the list, but I was wondering if there is a neater way to do it?
View 2 Replies
View Related
Jan 28, 2015
I have created a combo box which lists companys, when i click on a certain company it brings all records for that company but underneath the last record it shows all the other records on the form.
How do i get it to only show the records for that company only.
View 5 Replies
View Related
Oct 4, 2006
Hi,
I have a situation and i do not know how to handle it.
I am developing an application for a lawyer. In the data base i have the following tables: Files, the people table (that are involved in a lawsuit), and other tables. The problem is the following: in the people table, beside the primary key i have another unique element that is social security number.
In the files table beside the primary key another unique element exists: the number and date of the file (File 1 from 15.02.2006). A lawsuit file can have more law terms: today it has one law term and maybe next week another law term so i must have the same file many times in the table with the same code and another date, but i cannot add the same file many times in the data base because a file has data about one person and the social security number of the person is unique.
If anyone can offer me a solution it would be good.
Thank you!
View 2 Replies
View Related
Oct 25, 2006
Hi guys,
I've tried searching all the threads for an answer to my problem and I can't seem to find it....
Ok I know this should be simple...
I know to use Distinct and DistinctRow to only show unique records in a combobox but all I want to do is that once a selection is chosen in the combobox to add a record to a subform, it can't be selected again.
I know in some cases you do, e.g. items on an invoice sometimes need to be entered more than once, but I'm listing Skills for Employees and I only want a user to enter a Skill once per Employee (although Employees can have many Skills, I just don't want a User to accidentally put the same Skill in twice or more per Employee...)...
What's the best optimized way of achieving this?
Sorry for my newbiness.
dazza61
View 5 Replies
View Related
Oct 25, 2006
Hi guys,
I've tried searching all the threads for an answer to my problem and I can't seem to find it....
Ok I know this should be simple...
I know to use Distinct and DistinctRow to only show unique records in a combobox but all I want to do is that once a selection is chosen in the combobox to add a record to a subform, it can't be selected again.
I know in some cases you do, e.g. items on an invoice sometimes need to be entered more than once, but I'm listing Skills for Employees and I only want a user to enter a Skill once per Employee (although Employees can have many Skills, I just don't want a User to accidentally put the same Skill in twice or more per Employee...)...
What's the best optimized way of achieving this?
Sorry for my newbiness.
dazza61
View 1 Replies
View Related