1 Combobox With Values From 2 Tables?
Apr 23, 2013
I Have to tables, Employee's & Vehicle's. I'm making a dispatch form. and i want to put a "Unit Dispatched" combo box that will populate from the Employee's ID and the Vehicle ID. We sometimes dispatch employee's to a job on their own and sometimes we send a company vehicle. is there any way to do this?
View Replies
ADVERTISEMENT
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 22, 2005
I have 2 comboboxes.
i select the value from one combobox.
i want the second combobox to be filled with the values corresponding to the selected value in first combo.
first combo is bound with some other table and second combo takes vales from some other table.
How can i do this?
View 1 Replies
View Related
Mar 9, 2006
How can I refrencence any value within a combobox (not the one selected)? I want to try and acheve something like this:
cboSomething.Value(3)
Although that doesn't work. Is this possible?
View 3 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
Nov 7, 2004
Hello!
I have a combobox on a form and it shows values from a query. I pick one value and presses a button, then a new form opens with a lot of information based on the value in the combo box. In this combobox I would like to have a value called "All", if I choose this one I want All of the information to be shown. I would like to know how to get this to work (create a question with a term like this: IIF([Forms]![frmMaskin]![cmbAvd]="All";Like "*";[Forms]![frmMaskin]![cmbAvd])). When I do this, I se nothing. Please give me some advice.
View 2 Replies
View Related
Sep 23, 2011
So I have a textbox on a form that contain values. I want to convert it to a ComboBox. Since a lot of these values are the same in a lot of records (for example, "Inventor"), I want the entered values to appear in the ComboBox dropdown so they can just be selected instead of typed in. I converted the textbox to a Combobox by right-clicking on the textbox => Change To => ComboBox. It changed successfully, but I want it to list the values in the dropdown, but it doesn't.
View 1 Replies
View Related
Feb 13, 2008
Hello,
i have done a search.. and found a post which half answered my problems..
I have a Table with some columns which contain Yes/No check boxes as field types.
I have a form with two unbound combo's with their rowsource property set to a Value List "0";"-1"
When I run my form I get 0 and -1 as options in the combos..how would i get Yes or No as options. (i have changed the Value List to "Yes";"No" but the query gives me an error. I also tried to set the rowsource to SELECT Distinct Car from Pupils; and this 'does' work but i dont get the ALL column. I have also tried SELECT Car from Pupils UNION SELECT "" from Pupils;
This gives me the ALL at the top..but 0 and -1 as values to choose from..
I understand that Access stores values in checkboxes as 0 and -1
so to recap..
I want to click on the dropdown combo and have a blank 1st entry.. then entry 2 and 3 will be Yes and No ..not 0 and -1
attached my db file..
kind regards
omar
View 6 Replies
View Related
Feb 17, 2005
I am using a combo box to select client records. The problem I am having is that there are several clients with the same last name.
The query behind the combo box sorts on Last Name, First Name.
When I (as an example) select the second listed duplicate name from the combo dropdown, The form is populated with the data from the first duplicate name. (example Jones, John or Jones, William).
How can I make sure that the selected name will populate the form?
Thanks
View 1 Replies
View Related
Jul 16, 2013
I have a combobox with the following specs.
Row Source Type = Value List
RowSource = 1;test1;2;test2;3;test3;4;test4;5;test5;6;test6;7; test7;8;test8;9;test9;10;test10;11;test11;12;test1 2
ColumnCount = 2
ColumnWidths = "0cm;8cm"
Bound Column = 1
For some reason unknown to me, although the combobox does drop down when entered, the values are not visible until selected, then the selected item is visible in the combobox, but still isn't visible in the drop-down list.
EDIT:
I'm using Access 2010
View 9 Replies
View Related
Mar 7, 2014
I have a form with a combobox and a treeview. When I select an item in the combobox, the treeview is updated with info related to the combobox value. When I browse through the nodes in the treeview, I want to see which other values will give that very same node. I could use the concatenation function* I found at Allen Browne's site, which will return a number of values in a single string.
What I'm looking for, is basically some sort of tag cloud. If the user selects node X, the tag cloud needs to show which values in the combobox will all lead to node X. The combobox values that lead to node Y shouldn't be visible at all in the tag cloud, or maybe just shown in a different color. The user should be able to click on the value, which will trigger the combobox_click event.
how many values there will be in the table behind the combobox. That's what's making this problem difficult to solve. Putting the form in design view, adding a textbox and returning to form view is not an option. How do I create a dynamic tag cloud? Is it possible to transpose a table column on a form?
View 1 Replies
View Related
Jan 24, 2005
Hi,
I have a table of records, with one field of the records a combobox populated by a select query based onanother table.
My problem ism that it doesn't seem to recognise any of the values as on the list, though deleting one character and then replacing it results in the value being accepted with no problems.
This is a database I have inherited (Cheers predecessor!), the table is populated with a few thousand records and scrolling through this table results in an error message on this field for every record and is making displaying data on this form a nightmare! Anyone know of the cause or of a quick fix?
I don't know the history of this table unfortunately.
Cheers in advance
John
View 6 Replies
View Related
Aug 21, 2014
how I can set multiple default values in a ComboBox in a form. The ComboBox is based on a table and my main table also uses the ComboBox.
Example:
Main table has a column "Brands". The ComboBox is based on another table which includes the following items (and thus the ComboBox also shows them):
- CocaCola
- Fanta
- Sprite
The form has the same ComboBox which is linked to the main table.
Now, if a user creates a new form entry, all ComboBox items should be preselected (checked). It does work with one item over the standard "Default" property.
View 4 Replies
View Related
Sep 25, 2014
I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:
Dim qDef As QueryDef
Dim Query As String
Dim st As String
Dim rs As Recordset
st = "SOV"
Set qDef = CurrentDb.QueryDefs("get_query_reason")
[Code] ....
View 2 Replies
View Related
Jul 18, 2013
Here's my dilemma: I have a table that keeps track of job postings and how many people applied for each posting. So, for instance, I can have 20 people apply for a job posting say....on July 18. On another column I have the shift name for that posting such as DAY Shift. So, I have 20 people that have applied for the Day Shift on July 18.
What I'd like my combobox to show me in just one instance of July 18 in column 1 and one instance of Day Shift in column two. I have tried using the wizard and then going to the properties of the combobox and attempted to edit the SQL statement to use the DISTINCT value to no avail.
View 14 Replies
View Related
Mar 6, 2013
I am a newbie to ACCESS. I am stuck with inserting values of combobox directly into a record in table.
I have five different tables(each has only one cloumn) and a complete full_details table(contains 5 cloumns).
I have a simple form with five comoboxes and a save button on it. The five comboboxes are populated from five different comboxes at the time of form load. Now, I want to add values selected from these comboxes in fulll_details table.
My form is unbound. I tried with VBA code, on the save button click, I have written ,
Private Sub save_Click()
CurrentDb.Execute "Insert into Full_Details(Col1,col2,col3,col4,col5) Values ('" & Combo0 & "','" & Combo1 & "','" & Combo2 & "','" & Combo3 & "','" & Combo4 & "');"
MsgBox "Record Saved !!!", vbInformation, "Success"
End Sub
It gives me some error : "You can't reference a property or method for a control unless the control has the focus property set"....
See, above query works fine , if I set focus of one combobox,but it adds only 1 combobox value in full_details table as only 1 column value.
View 6 Replies
View Related
Feb 19, 2014
I would like to let vba select all (one after the other) values in a combobox and run a query. The code has to be run using a Do While Loop for which I already made the condition.The reason I want to automate this is to allow the user to quickly add new links in the database. The combobox is used in multiple queries.I rather code it than make new queries for this situation because it involves many queries that would have to be added.
View 4 Replies
View Related
May 22, 2014
I have an Employee's Development Objective main form , which has a subform that contains a combobox that lists all 'Job Titles' and 'Job Objectives' within the company, say such as:
Code:
IT Manager, Create Spreadsheets
IT Manager, Manage Staff
SQL DBA, Create Databases
SQL DBA, Create Spreadsheets
Managing Director, Manage Finance
Managing Director, Manage Staff
How do I get the subform combo box to ONLY display the Job Titles and Job Objectives specific to the Employees known Job Title? The combobox Row Source is presently:
Code:
SELECT qryJobObjectiveDetails.jobObjID, qryJobObjectiveDetails.jobTitle, qryJobObjectiveDetails.objective
FROM qryJobObjectiveDetails
ORDER BY [jobTitle], [objective];
The main form has a jobID number specific to the Employees job title.
View 4 Replies
View Related
May 9, 2013
I have a form for data entry that have multiple comboboxes. I am trying to get one combobox to base its "list" on an entry from a previous combobox. The first combobox is based on a QuantityType table and has four options.
The next combobox is based on a ProductDesign table and will have close to fifty options. I want to limit the ProductDesign combobox based on the QuantityType selection which will give the QuantityTypeID. This will refer to the QuantityTypeID linked to the ProductDesign table.I have created a query that looks like this:
SELECT Product_Design.Product
FROM Product_Design, Quantity_Type
WHERE Product_Design.QuantityTypeID = Quantity_Type.QuantityTypeID
AND Quantity_Type.QuantityType = [Forms]![Product]![Qty_Type];
This Query works and if I simply run the query I get the needed information from it.What I would like to do with this query is to populate the ProductDesign combobox with this data.I have tried putting the query in the RowSource field but I get an empty combobox without the data. The strange this is that the combobox must be getting something from the query because the length of the combo box varies based on my QuantityType selection. I.E. if I select "Single" in the QuantityType, the ProductDesign dropdown shows three empty places for data whereas if I select "Multiple" in the QuantityType I see that there is ten empty places for data.getting the combo box to actually show each option?
View 1 Replies
View Related
Jun 6, 2014
I am having issues with my combo box populating values based on the selection from another combo box.
Database : contains 2 tables: Staff_List, Level_Type and a form called frm_Test
The first combobox cboLevel gets its value from the Level_Type table with the select statement SELECT [Level_Type].[ID], [Level_Type].[Level_Type] FROM level_Type;
The values to be displayed on the second combobox cbo_Name is expected to be dependent on the Level selection made from the first combobox i.e if Level 1 is selected in cboLevel then only Names of people in Level 1 will be displayed in second combobox.
The select statement I put there is SELECT Staff_List.ID, Staff_List.Staff_Name
FROM Staff_List
WHERE ((([Staff_List]![Level])=[Forms]![frm_test]![cboLevel]));
This is not displaying anything in the second combobox after I tried it in the Form view, just empty.
View 3 Replies
View Related
Jan 29, 2015
Whenever I create a combobox, Access asks me if I want to grab the values from another table, or if I just want to manually input the possible values.
My question is: is one of the two solutions "better" than the other?
Let's imagine I am creating a Form where I can create a new Contact, and in a listbox (with multiple selections allowed) I want to list the possible character traits, so I have
- Funny
- Annoying
- Smart
- Interesting
- Good-looking
- ...
I think that if I need to store in the Contact records these possible traits, I will have to create a Many-to-Many relationship (therefor creating a junction table) between Contact and Traits.
On the other hand, could I do everything without grabbing values from an extra table and directly inputting the values in the listbox? How would these elements be stored in the Contact record if I allow multiple values in one single field?
View 9 Replies
View Related
Jul 10, 2014
I have a form where the user will choose a contact name or names from a multivalue combobox and I want the email address field to update with the corresponding emails separated by "; ".
View 1 Replies
View Related
Aug 16, 2013
I am creating a student database. I have crated a single table for this database and a form. Two combo boxes. I have created these two combo boxes named (Documents Submitted and Documents pending).
These two boxes I created using "Lookup coloumn". I selected "I will type in the values that I want" for both the boxes. After I filled the values in both as (CV, Ielts, Passport Copy, Certificates, photo id). After this I gave the name and selected "Allow multiple values".
Now in my form it shows both the combo boxes and in both the boxes it shows CV, Ielts etc. I can select multiple Items in both the boxes. I hope I am clear up to here.
Now at this point these two boxes (Document Submitted and Documents pending) are showing items (documents names) separately. What I want is to combine the values of both. I want to do is, if I select "CV, IELTS, passport copy" in document submitted box, rest of the pending names (Photo ID, Certificates) should automatically be filled in Document pending box. What ever I didn't select in Document submitted box should appear in Document pending box.
For better understanding i am attaching my file with it.
View 1 Replies
View Related
Aug 29, 2014
I'm using Access 2010. I need to calculate a score based on values selected in a table by looking up corresponding values in other tables. I have a "Project" form to create new entries into the Project table (see Table 1). When I create a new project record, I will select values for the Payback and Need fields by selecting options from a list. The Payback list is pointed at Table 2 and the Need list is pointed at Table 3. In the below example, I created the "ABC" project and selected "1 year" for the Payback field and "Repair" for the Need field. Pretty simple.
Now that I have the "ABC" project loaded to my Project table, I'd like to create a report that will show a "score" for this project. The score should be calculated as follows: Payback Impact + Need Impact. In this example, the score should be 30 (Payback Impact of 20 + Need Impact of 10).
View 5 Replies
View Related
Oct 20, 2014
I am trying to get a combo box to only show unique values, but I can't get it to work properly - it still shows duplicates in the list.
The Row Source is set to
SELECT DISTINCT Areas.ID, Areas.Area FROM Areas ORDER BY Areas.Area;
And the combo is bound to column 2
View 12 Replies
View Related
Feb 25, 2014
I want to empty the combobox every time when form loads. Using the below code
Quote:
Private Sub Form_Load()
combo1.RowSource = ""
End Sub
But Combobax is not emptying.
View 6 Replies
View Related