Adding Records To A Combo Box
May 17, 2005
Hi all,
I have a data entry screen that requires the user to select a assessment type from a combo box that gets its values from a separate table. So far i have 3 Assessment types, these are Quality, Manufacturing and Technical.
If the assessment type they want is not is the combo box list. I want them to be able to type in the assessement type in the combo box and have it saved to the assessment type list so that in future it will be availible directly from the combo box.
Any ideas on how i can do this as it's giving me a head ache....
Many thanks in advance.
El Cid
View Replies
ADVERTISEMENT
May 31, 2007
hello,
I have 10 combo boxes on a form looking up at the same table (fileld A). I want the user to be able to enter a new value (that's not in the table and therefore neither it is in the combo box) to the 1st combo Box (let's say) and that same value to be automatically added to the table, so when I use the next (2nd one) combo Box, that same value is already in the table.
How can I do this??
Thank you very much
View 1 Replies
View Related
Dec 8, 2004
I need code for the 'On Not In List' event procedure so that users can add a new item to a combo box...
its just a simple combo box linked to values in a table
any help would be great
thanks
View 9 Replies
View Related
May 24, 2005
Hello,
I have a bound combo box on a form. The selections alow a subform to refresh limiting records to the bound combo box. I have been on the web a lot looking for a way to enable multi list selection or all on a combo box. None of these have worked for me. The selection combo box is a simple Yes or No. I would like to add all and have it return both types of records.
This is the sytax I have in the row source property for my combo box.
SELECT [Sales Master].[Accounting Comp Flag] FROM [Sales Master] UNION Select "All" FROM [Sales Master] GROUP BY [Sales Master].[Accounting Comp Flag];
This code allows the combo box to have an all selection but it does not retrieve any records.
If someone can find my mistake that would be great! Thanks!
View 7 Replies
View Related
Aug 2, 2006
Hi,
I'm trying to add a combo box to my query so when I select the item from the combo box it executes my query. I don't know where to begin... Any help??
View 7 Replies
View Related
Mar 4, 2005
I have two related tables - one is study information and one is person information. For each study, a person is assigned. On my form, I have a combo box to choose a person to add to a study. This works fine when the person exists already. To add a new person, I have an "add" command button that brings up a form to add a new person to the table. Problem is when I close the form, I'd have to find the person in the combo box to add them to the study. Is there a way to add a "person record" to the person table and when I return to the study form, have that new person already associated with the study? I don't allow users to edit the person info from the study form (the same person may be associated with different studies). Any ideas to help? Thank you.
View 2 Replies
View Related
Jan 15, 2005
I'd like to create a combo box that is not limited to the list of records from a table, but allows the user to add to the table by typing into the combo box. I believe I write this code in the "after Update" event, but I'm not sure of the syntax. Can someone help?
The combo box is simply displaying the records from another table...so the code would add a record.
Thanks much!
View 7 Replies
View Related
Mar 13, 2013
I would like to add a value that i choose from a combo box to a table by clicking a button after selecting it from the combo box, and i do not know how to do it?
View 11 Replies
View Related
Sep 26, 2011
I am extremely new to access. I am trying to add a combo box to one of my columns. Basically i have about ten columns of which a couple of them I want to have combo boxes so that the information that is in each of these columns is standardized. Currently all I have is my ten columns with headings set out.
View 3 Replies
View Related
Apr 1, 2012
I've created a simple form with a combo box, using wizard, and I create this code. for to add items when isnotinlist event. After requery, old data are changed to primary id numbers.
E.g.
Nametxt, id=1
Surnamext, id=2
Agetxt id =3
When i add a new item, the first item nametxt, converts to 1. This is the id. Here is the code
Dim cnn1 As ADODB.Connection
Set cnn1 = CurrentProject.Connection
Dim rs As New ADODB.Recordset
rs.ActiveConnection = cnn1
rs.Open " SELECT * from affectiontbl ", cnn1, adOpenDynamic, adLockPessimistic
[Code] ....
View 12 Replies
View Related
Dec 6, 2006
Does anyone know of a way to allow a user to add further info to another field on the same record that's created by a combo box that is using the Not In List method?
Dim strsql As String
Dim i As Integer
Dim Msg As String
'Exit this sub if the combo box is cleared
If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not in the list of Callers names." & vbCr & vbCr
Msg = Msg & "Do you want to add it?"
i = MsgBox(Msg, vbQuestion + vbYesNo, "Unknown Caller...")
If i = vbYes Then
strsql = "Insert Into tblCallersName([CallersName]) values ('" & NewData & "')"
CurrentDb.Execute strsql, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
I need to log a persons name & phone number without having to re enter it again the next time.
To log the name I use a combo box that lists all the previously added names & it also allows you to add further details if the name does not already exist
I now need to work out how to also add the phone number without having to manually go into the names table to add it in.
If anyone understands what I'm talking about then you're halfway there :D
See attached db
thanks
View 2 Replies
View Related
Sep 4, 2005
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
View 7 Replies
View Related
Mar 15, 2006
I have a Combo Box that places the Address into the given Address field. How can I have it place the second and third cloumns, from the Combo Box into the next two adjacent fields on the Form (Last Name & First Name)?
Please describe in detail, not just code, but where a how it goes. I am new at this thing.
View 1 Replies
View Related
Jul 28, 2005
I have an existing FORM called Evaluations where you can select a trainer and a trainee from two different combo boxes. Once a name is selected from both of the combo boxes I click on an assign button and I want it to record those two names selected into my evaluations table in the Trainer_Name and Trainee_Name columns.
How do I do that??? Please help??
Thanks
View 2 Replies
View Related
Apr 9, 2015
I'm working on a database where users enter an assignment into a datasheet form. Assignments are selected from a combo box that has values stored in a table. After choosing the assignment, the user adds the date it was completed. After this is done, I would like the "Next Due" column to update. Each assignment will have a different next due date, such as one year from the completion date, six months, etc. I don't know how to add different values depending on the combo box selection.
View 5 Replies
View Related
Nov 8, 2004
I have seen a few articles here and there on using a combo box to filter records in a sub-form and to filter records in another combo box, but I am not getting anywhere. I hope someone can belp
Exercise 1
For this exercise, I have the following tables:
tblClients containing client names
tblProjects containing some project details
I want to set up a simple form, so that the user can select a client name from a combo box on the main form which filters the project detail records in the Projects sub-form.
Once the user enters project details, I want this info as well as the selected ClientID to be fed back to tblProjects.
Exercise 2
I have the following tables:
tblProjects as above
tblWorkstream containiig names of workstreams and some other details.
Every project has one or more workstreams
I have a form where users will enter hours worked on each workstream. They will first select Project from a combo box on the main form. This should then filter records to be displayed in the Workstream Combo box, before they can then enter hours.
Please let me know if you need me to explain any part of this better.
Thanks in advance.
ps. I am a novice, so I'm hoping to do the above using default MS stuff, not with complex programming!!!
Thanks
View 14 Replies
View Related
Mar 12, 2015
I have lots of combo boxes in my forms that are mostly limit to list as I want the people entering the data to actually add the full details of a client or supplier or whatever instead of just typing the information in over and over again. if the person/client/supplier is not in that list I have a button that will pop up a form so they can add a full new record but I need it so when they add the new record it will show up in the combo box in the intial form once it has been saved and closed without having to also close that initial form and reopen it or manually refreshing it.
right now I am using an if statement on the save button on my popup form that looks at what form is open and if that form is open then it refreshes that form after the save and closes which works fine but adding this to every form and combo box combination is very tedious, so I thought I would ask here, what is the best way to update combo boxes after and new record has been added via another popup form?
View 2 Replies
View Related
Jun 5, 2014
I have a search form with unbound combo boxes that uses the combo box values as criteria for a query. The Row Source of cboCategory is based on the query:
SELECT Categories.ID, Categories.Category FROM Categories ORDER BY Categories.Category;
When I start the form and I don't select a value for the cboCategory combo box, the query just returns all the values. This is great. The problem is that if I make a selection in the combo box, I have no way of reverting it back to that initial value that would make the query return all categories - if I erase the combo box the query returns nothing. So I have to close the form and reopen it.
I tried adding an "All" value to the combobox like so:
SELECT Categories.ID, Categories.Category FROM Categories UNION Select Null as AllChoice , "(All)" as Bogus From Categories
ORDER BY Categories.Category;
but it does not seem to work. It just returns nothing instead of all the categories. How can I add a value of "All" to the combo box that will return all of the categories?
View 8 Replies
View Related
Oct 10, 2005
This is probably an age old question but after a search I could not find the answer.
I have a table with 3 fields..... last, first, ssn
I have a form with 3 text boxes. I want users to input data into those text boxes and that data inserted into the table. The code I have figured out, the problem is access tells me I cannot add to the table because the controls do not have focus. Well, I can set focus to one control at a time but then that adds three separate entrees. Am I doing this the real hard way? Im sure there is an easier way to add records to a table with multiple fields.
Thanks
View 2 Replies
View Related
Oct 28, 2005
I have am building a program that requires a staff person to enter a daily activity report on employee activity. It's initiated by adding a new record
that will allow the selection of an employees name and ID number from a drop box into respective first name, last name and ID fields. The staff person would then go on to complete the daily report by adding information in several other fields.
My form is based on a relational query built from two tables; tblClient and tbldailyreport.
Any help would be appreciated.
Regards
Timber
View 1 Replies
View Related
Feb 22, 2005
I have set up a form which is linked to a table. When the form is opened from a menu it goes straight into a new record which is what I want.
However by using the wheel on the mouse the user is able to scroll through all records in the table.
All I want the user to do is simply add a new record and not be able to amend the old records (this is done elsewhere in the database)
how do I do this?
cheers
View 2 Replies
View Related
May 5, 2005
Hi,
I am having a problem with a form in that I can no longer add new records to it!
The data comes from a query formed of 2 tables, linked by a 1-many relationship. I can add records to both the underlying tables and the query with no problem, but in the form I can't. I get no error message when I try to add a new record, just the windows error bleep. Properties for the form are exactly as they were last time it worked properly.
I have made changes to the database since - but not to this form specifically.
Any ideas of what I might have inadvertently done?
Many thanks
View 1 Replies
View Related
May 6, 2005
Hi,
I am having a problem with a form in that I can no longer add new records to it!
The data comes from a query formed of 2 tables, linked by a 1-many relationship. I can add records to both the underlying tables and the query with no problem, but in the form I can't. I get no error message when I try to add a new record, just the windows error bleep. Properties for the form are exactly as they were last time it worked properly.
I have made changes to the database since - but not to this form specifically.
Any ideas of what I might have inadvertently done?
Many thanks
View 1 Replies
View Related
Jun 15, 2006
Hello!
It's been a while since I've asked a question here, but I can't seem to figure this problem out.
I am setting up a form using data from 4 different tables, all related, and I can't figure out how to add fields that I didn't initially add during the wizard set-up. I used the wizard because it's easier for me to do that and then go in and make the changes I want to make.
When I get data from just one table, all of the available fields from that table are in the "Field List" no matter what fields I chose to include in the wizard process. That's good. But when I get data from more than one table, only the fields I initially chose in the Wizard process are showing up in the field list. I can't figure out how to add a new and different field from one of those tables.
The way I "solved" this problem the first time was to start over, creating my form from scratch--but now that I've done a lot of work, it just occurred to me that I will need to add 2 more fields. (I actually don't even have those fields in a table yet, but I will add them later.) So, this will be an ongoing problem. Since this form will get much use, by several people, I don't want to have to re-create it every time I want to change something.
So, is this possible? How can I add another field?
Also, while I am at it... A combo box was working beautifully to look up specific records when I was gathering information from only one table. It isn't working anymore.
Thanks in advance!
-Siena
View 8 Replies
View Related
Jun 20, 2013
I am creating a form in access. In the form there is a combobox in which I am adding items using RowSourceType as Value list and Row Source as Male;Female. What I require is whether there is some way so that when I select Male from combo box M is stored in database and with Female F is stored. I know how to achieve this with RowSourceType as Table/Query but not with RowSourceType as Value List.
View 1 Replies
View Related
Jul 27, 2015
I stumbled on to a Dynamic Multi Search form on this site and have been tailoring it to my organization's directory of contacts. Everything was going good until I was asked to include a search by groups to which each individual may belong. The data in the table is contained in Yes/No check boxes for around 30 different groups. I am hoping to add a combo box to the Dynamic Search as a means to pull up individuals in any 1 category. Below are two attempts at what I thought might work, however, neither performs any filtering.
Code:
Private Sub Groupbox_Change()
Dim db As Database
Dim qdf As QueryDef
Dim strSQL As String
Set db = CurrentDb
Set qdf = db.QueryDefs("qryGroup")
[code]....
View 6 Replies
View Related