Forms :: Limit Items In A Combo Box?
Aug 12, 2013I have a combo box in which I wish to show the Person_ID's of every record in the table TBL_Person, except those which are returned by a separate query. Is this possible at all?
View RepliesI have a combo box in which I wish to show the Person_ID's of every record in the table TBL_Person, except those which are returned by a separate query. Is this possible at all?
View RepliesIn the form frmOrders of my database i have a combobox where i can choose a ClientID and the dropdown list shows me all the clients in upgoing order with their related orders in descent order.But the drop down list doesn't show all available clients. The two hundred heighest clientnumbers aren shown. However if i type one of these clientnumbers in the textbox of the combobox, the client is found.If i go to the property sheet of the combobox and activate the query that serves as the recordsource of the combobox, all clients are shown!!!I control of the records of these clients in the table Orders, doesn't show any difference with all the other records.What can be the reason for these behaviour. Is it a question of a limit of records that can be shown via a combo box?
View 4 Replies View RelatedI have a form that has three cascading combo boxs, plus a subform. The third combo has a list of questions, and you put your answer in the txt box in the subform.
What has to happen is that the combo box has a number of questions and each has to be answered, is there a way to know if all these questions have been answered by knowing what listindex or listcount ect that has be used and to have something set to advise the user that there are more questions and what ones are to be answered.
I have two synchronised combo boxes that are working brilliantly except for 1 thing.
The two boxes are Site and Building. I find a site from the Site box dropdown and only the buildings for that site are shown in the Buildings box dropdown. Perfect!
However, I have got 3 fields showing in my Buildings dropdown.
Private Sub cboSite_AfterUpdate()
Me.cboBuilding.RowSource = "SELECT BuildingName, BuildingCode, Status FROM " & _
"BuildingT WHERE SiteID = " & _
Me.cboSite & _
" ORDER BY BuildingName"
Me.cboBuilding = Me.cboBuilding.ItemData(0)
End Sub
that is BuildingName, BuildingCode and Status.
All three show in the dropdown
BUT
only BuildingName shows in the actual Building Box and I would like all 3 to be visible once I have decided on the building name I need!!
Can this be done by changing
Me.cboBuilding = Me.cboBuilding.ItemData(0) (as above)
to
Me.cboBuilding = Me.cboBuilding.ItemData(0), Me.cboBuilding.ItemData(1), Me.cboBuilding.ItemData(2)
or something similar??
Or do I need to create 2 new boxes to return the other values?? I am so close to achieving what I want with this form!!
I have a form with four combo boxes on it, the four boxes all open the same form and return a record based on the selection from a different column from the same query.
To make it work smoothly I think I need to make it so it is only possible to enter data in one combo box at a time. I could also do with some error handling.
Field B is a combo with the options of : 100% Availability, 75% Availability, 50% Availability, 25% Availability, OR Not Available
If I choose "Present" in Field A, I want the "Not Available" value to disappear as an option.
I want to limit the results in a query to the selected items on a list box - how do I do this?
View 4 Replies View RelatedI am using the following code in a textbox (CountryID) to show a country name (CoName) from a table (tblCountry). If the comboBox (cmbCoName) in current form (frmCountry) has no entry then CountryID remains blank, great. If I use the form to add a new entry then CountryID flashes because it does not recognize the entry. Can I use "or" to add another condition in the IIF statement so that it allows the "not in the combobox list" entry?
Code:
=IIf(IsNull([txtCoName]),"",DLookUp("CoName","tblCountry","Country_ID = " & [Forms]![frmCountry]![txtCoName]))
So I have a combobox that pulls values from a table. I am being requested to do an update to the database which means that I have to filter some values on that combobox based on a field on a previous form.For example:The main form is called "frmcontacts" and has a table field called "txttypeofcustomer" which can have two values: "customer" or "dealer".
The form that contains the combobox is called "frmnewissue" the combobox is called "cmbissuetype". "frmNewIssue" is opened through a button on "frmContacts". This combobox pulls the values from a table "tblissuetype". The values in that combobox are then: "Repair" "Return" "Question" "Replace".
If the value on txtTypeofCustomer is "Dealer" then all the values for the combobox remain visible. If the value of txtTypeOfCustomer is "Customer" then "Replace" cannot be visible or has to be greyed out.
Now I have a combo box "cbo_items" and a text box "txt_selectedItems", I want to populate text field with items selected from the combo box, every time i select an item it appears in text box and to be separated with comma, so text box appears like this ( item1, item2, item3), and after finishing the whole thing the result appears in lable "lbl_result" as "total items selected: 3 items".
View 1 Replies View RelatedLet's assume we have 3 tables:
Order_Category (Order_Category_ID, Order_Type_Name) with 2 records:
1, Minor
2, Major
Order_Type (Order_Category_ID, Order_Type) with 4 records:
1, Book
1, Pencil
2, Car
2, House
Orders (Order_Category_ID, Order_Type, value) with 2 records:
1, NULL, NULL
1, NULL, NULL
2, NULL, NULL
I want to create a Multiple Items form presenting Orders table with two Combo Boxes:
1. A combo box to select Order_Category_ID.
2. A combo box to select Order_Type. When 1 (Minor) is chosen in the first combo box it should show Book and Pencil, when 2 (Major) is chosen it should show Car and House.
Examples in the Internet show how to do it on a 'single row' forms using the RowSource property. I tried to use a query like:
SELECT Order_Type
FROM Order_Type
INNER JOIN Orders ON Order_Type.Order_Category_ID = Orders.Order_Category_ID
WHERE Order_Category_ID = [comboBoxOrderCategoryID]
But it sets same values for all records in the Multiple Items form and it should return different values in each rows based on value in the first combo box (Order_Category_ID).
I have a combo box that worked fine. Now it will not show any records after the 65530th record. I can remove a record and it will show the next one down so it appears to be a setting that controls the nuber of records shown. Any suggestions on how to show all the records would be great.
The program is attached to a SQL table.
Order Forms in my database have a combo box Refference from Quotation.
When i select a refference then automatically i create an order.
Is it possible to limit the list on Refference, lets say when i have selected the refference
once do not display it again?
I have 2 tables. One is Quotation and the other one is Contacts.
In Quotation Table i use a combo box to select a Customer from Customer Table.
Also in Quotation Table a have a combo box (TO) to select a name from Contacts Table.
The problem is that i want to select contacts only related to Customers and not view the
complete list.
For example Vodafone Company has several contacts.
When i press Vodafone in my quotation form then when i go to (To) combo box i would like to view only the
related contacts.
I tried the SELECT statement WHERE but i can to figure out how i will limit the list depending the Customer Name?
Please help.
I have a combo box displaying refference values.
Those refference values when i select them once i do not want to use it again therefore i do not want to be displayed again. Is it possible to do that?
Maybe with After Uptade code i can do that and how?
Please help
Hi, I know well that combo box has a 64k limit, and whilst there are obvious work around, does anyone here have any sample code for such a solution?
I'm not an expert ms access programmer, and it would save me a lot of time if I had an example to work with.
Thanks
I have a Combo Box based on a table list on a Form. I want to choose several items from the list to feed a Lookup Query. Can this be done? :rolleyes:
View 1 Replies View Relatedi have a combo box containing dates, however it will only display the date at the top of the list, no matter which date is selected.
any help would be gratefully excepted!
cheers
Hey Guy and Ladies,
In one database (Originally an Orders Database created by wizards)
This code to add items to a drop down list in the “orders details subform” works fine.
Private Sub ProductID_DblClick(Cancel As Integer)
On Error GoTo Err_ProductID_DblClick
Dim lngProductID As Long
If IsNull(Me![ProductID]) Then
Me![ProductID].Text = ""
Else
lngProductID = Me![ProductID]
Me![ProductID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!ProductID.Requery
If lngProductID <> 0 Then Me![ProductID] = lngProductID
Exit_ProductID_DblClick:
Exit Sub
Err_ProductID_DblClick:
MsgBox Err.Description
Resume Exit_ProductID_DblClick
End Sub
When the same code runs in my new database
Private Sub OptionID_DblClick(Cancel As Integer)
On Error GoTo Err_OptionID_DblClick
Dim lngOptionID As Long
If IsNull(Me![OptionID]) Then
Me![OptionID].Text = ""
Else
lngOptionID = Me![OptionID]
Me![OptionID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!OptionID.Requery
If lngOptionID <> 0 Then Me![OptionID] = lngOptionID
Exit_OptionID_DblClick:
Exit Sub
Err_OptionID_DblClick:
MsgBox Err.Description
Resume Exit_OptionID_DblClick
End Sub
I get the error message
“You tried to assign the Null value to a variable that is not a Variant date type”
Any suggestions?
Also if anyone knows a better way to add items to a list box “On the Fly” I would really appreciate it.
It would be nice if you could type in the value and it would automatically add it to the list for future use.
Thanks for all of your help,
Joe
Need some help here....
I am designing a database to keep track of workers for a haunted house. I have a Roster table, a table of all the nights we are open, a table of Spots in the house, and a table to record who works what nights and what spot they are in. This table has a Room combo box and a Spot combo box. The Room combo has a Row Source of SELECT DISTINCT SpotsAll.Room FROM SpotsAll ORDER BY SpotsAll.Room; The Spot combo is then populated with VB code all the Spots that are in that room. That works fine. This is what I'm trying to accomplish: When a Spot is assigned to a Worker for that night, I want that spot to no longer be available in that list FOR THAT PARTICULAR NIGHT. So, lets say Joe Somebody works in Spot 1 (out of 4 lets say) of the Library Room, when we assign another person to the Library room, I don't want Spot 1 in the Spot list.
Can this be done with a query or VB code? If I'm not making sense, please let me know. I can also upload the Database I am creating so that you can play around with it and see what I mean.
(I have attached a word doc. that shows the table relationships.)
Thanks a lot ahead of time!!
ScrmingWhisprs
Is it possible to select more than one item in a combo box? I have attached a sample of a database I am working on. I have a table called Interests and on the Bookings form, I would like to be able to select more than one interest in the Interests combo box, but I can't figure out how to do it. In databases I have seen, you simply have to hold down ctrl or shift to make multiple selections - that's what I want to do.
Can anyone help, please?
Thank you!!
I have a combo box that has three items in it. Name, ID_Num, Date
I need to use ID_Num and Date to filter the results of query. I can use one or the other but not both. I have tried ListIndex but apperently am writing it wrong in the expression builder.
[Forms]![TableName]![Combo0].
[ListIndex]????????????
I have tried =0, =1, =2 after the
[ListIndex] but it doesn't work.
How do I use two items from combobox in a query?
I have a DB with 4 tables:
Property (used for look-up values)
Service Type (used for look-up values)
Rate Table (uses the Property Table and Service Type Table and is used as a rate look-up table for the daily service table noted below)
Daily Service
Using the Daily Service table, I need to choose a property, choose a service type that is limited to the property (100's of service types, but a property may only have a limited number), and enter a quantity, and have the Rate Table return the specific cost of the service. I didn't think this was too hard in Access (2013), but I seem to be hitting a wall and spending too much time figuring it out. Now I am behind in my project.
I have been trying to do this in a table format, but have been unsuccessful in limiting the results of the Service Type combo box based on the property chosen.
I have a small database, that I would like to use a combo box to allow user to select a value based upon values already entered on table, and then if value is not found enable the user to enter a new value that will then become part of the selection for future record adds.
View 1 Replies View RelatedSo I've been reviewing cascading combo boxes and I am finding some good stuff. But here is a preliminary step I need. I need to tag each record with something like what month are they assigned in, and what products. Then I need the combo box to display what that month is that they are tagged in, and then populate the second combo box. It is the second combo box that will show the record on the form. Its possible that there will be two items they are tagged with.
View 7 Replies View RelatedI have a form with a combo box named 'Venue'. The combo box values comes from a Table with a list of about 200 countries. As of now a user is able to select only one country. However, I want users to be able to select more than one country.
View 1 Replies View Related