hey guys, i have this code which will let you type into a combo box "db" and it will pick out the selection "Die Cut / Back Slit". the following code works except for an error message coming up before it goes into the code.
"the text you entered isnt an item in the list"
anyone know how i can get around this? i tried turning warnings off on the sub but it seems to happen by default before the sub?
Code:Private Sub cmbCut_KeyPress(KeyAscii As Integer)' if pressed not enter or tab , add to a string then select value from entered chars'enter or tab key pressed (added delete and space keys to miss adding to string)If KeyAscii <> 13 And KeyAscii <> 9 And KeyAscii <> 8 And KeyAscii <> 32 Then enteredChars = enteredChars & Chr(KeyAscii)Else DoCmd.SetWarnings False Select Case enteredChars ' get letters entered and set value from combo Case "S" Me.cmbCut.Value = Me.cmbCut.ItemData(0) Case "B" Me.cmbCut.Value = Me.cmbCut.ItemData(1) Case "D" Me.cmbCut.Value = Me.cmbCut.ItemData(2) Case "DB" Me.cmbCut.Value = Me.cmbCut.ItemData(3) Case "T" Me.cmbCut.Value = Me.cmbCut.ItemData(4) Case "F" Me.cmbCut.Value = Me.cmbCut.ItemData(5) Case "FS" Me.cmbCut.Value = Me.cmbCut.ItemData(6) Case "FC" Me.cmbCut.Value = Me.cmbCut.ItemData(7) Case "FSC" Me.cmbCut.Value = Me.cmbCut.ItemData(8) Case Else 'do nothing End Select enteredChars = "" DoCmd.SetWarnings TrueEnd IfEnd Sub
Hi I was wondering if it is possible if I press a key on the keyboard say 'c' once I've opened the combo box, that I will be taken to name in the SECOND COLUMN that begins with c. At the moment if I was to press 'c' it will take me to a unique identifier that begins with c as the unique identifiers are in the FIRST column not in the second.
I am working on creating an access database for tracking physical assets linked to locations. I need to make a combo box list to show items other than the current location of the asset. Basically I need it to refer to last enery of the user and define the new possible entries. so we have a unique relationship between location and asset. The assets and location will always remain fixed and there is never going to be any addition. I am creating a web form so that it can be uploaded into sharepoint.
I have a subform when a user presses Return Or Enter it doesnt go to a new record but instead enters a new line in the same records how can i prevent this from happeneing.
Yea yea I know, another one... But the way I see is that I haven't asked them all so its ok... :p
Right basically, I only want to allow input of Y N or P into a text field. I thought it would be best to do it with an onkeypress event as I know of no way to block certain characters in a text field with an input mask.. this is what I came up with but it doesnt seem to work...
If Not KeyPress=78 Or Not KeyPress=80 Or Not KeyPress=89 Then KeyPress = 0
I have a form with a list box that is filtered by the entry made into a combo box. It works fine except that I want an option which shows all records in the list box. I tried using the formula below in the query criteria for the list box but it returns no records when I select All in the combo box. Why won't it work? Is there a better way to do this? Can anyone help?
I'm looking for a little bit of help here. I have a form and on this form I have a combo box. Now this combo box is populated by a table that I have called "Options". So this is all fine and dandy to select items already existing in the table, but ideally I would like to be able to input a new "Option" through this combo box if it doesn't exist in the table already.
I'm thinking I'd have to do something with the "On Not in List" event but I don't know VBA at all.
Also, I will eventually have a Price box next to this combo running off a query driven by the entry in the combo box. Again, I'd like to be able to input a new cost to the existing item or a cost for the newly entered item
I have a form where users can specify crtieria for a query. The value that the user enters via a combo box on a form is entered in a query. The user then hits a button to run the query.
Problem is the entry i have in the criteria of the query that links to the form is not quite right. It work for when they enter a value but causes problems when they leave it blank. I currently have:
Like (IIf(IsNull([Forms]![Main]![CBGroup]),"*",[Forms]![Main]![CBGroup]))
CBGroup is the name of the combo box and this expression sits in the criteria of the group field.
If the user does not enter a value in the combo box i want the query to return all the records, including where the field is blank. However at the minute it only returns the records where there is any value, not the blanks as well.
The expression above works fine with Text boxes but not combos.
Sorry for the essay, thanks if you read down this far.
I built a db for tracking and entering sales info but I'm having a problem with one of my combo boxes. To make entering data easier, I created a combo box that you can select a sales persons name from, then based on who is selected, their Title and Office location also populated.
The problem I have is when I want to manually type in the Name and other info for a temporary sales person. How can I allow users to choose from the drop down or just type it in if that person is not in the list?
I have several list combo boxes on my form that I want to prevent users from adding data to. How can I do this? For example, there is a list box for insurance carrier, etc. :confused:
I am learning access on my own, so please bear with me. I am using Access 2000. I have a form with a combo box. I use this form to enter data into the database. The combo box selections are from a separate table. If the required entry is not in the drop down menu selections from the table, the user needs to type in the proper selection. If this happens I want the table driving the combo box dropdown to be automatically updated with the new entry so that the data will appear in the drop down menu selections the next time. How is the best way of accomplishing this. Thanks for any answers and examples.
relationship -trainer to course (many to many) -course to programme(many to one)
I have created an input form to add new trainer. In the input form i have combo box to enter trainer's course n trainer's program.
Each time i save a new record. A new data is created in the course and program table. I dont want that to occur. I want the data to be saved in the trainer query with the existing course and program.
I have created a form that searches through one of my tables, via a query, it then automatically creates a report from that query.
I want to add an option into the combo box's that is blank.
Currently if you wanted to choose by 'fault category' but accidently click on 'failure analysis', it will take the top value of the combo as the entry, you can't then blank 'failure analysis'.
Each combo box gets its information from an independent table.
The only think I figured out what adding the refresh button which just closes then reopens the form so all the fields go blank.
first of all, i'm new to access. the only experience i have with it is reading the "microsoft office inside out", access section, and doing some research on the web.
i work for a school district and my boss has asked me to make a database with all our assets. i used to have everything in excel, but he prefers access, so here i am. what i'm wanting help with is making a combo box that lists manufacturers like hp, dell, etc., and then having the next field show a list of models depending on what was selected in the manufacturers field. so if i select dell, i want only dell models to show up in the combo list for models.
i can make the combo lists, but i don't know how to make it so that the entry in one field affects the list in another field. i've tried putting in lookup values, i've tried doing it with expressions in queries, and a few other things. i've tried searching google, and the forums and i've found things that are kind of similar to what i want, but doesn't do exactly what i want. so here i am...is there a simple way to do this? this isn't required of me, but now it's driving me crazy because that's the way i'd like to have it but i can't figure it out.
I can't work out how to update the selections available in a combo box as follows: I use a combo box in a main form to select a record (yacht) If it's a new yacht then I use an event linked to a button to call another form to add the new Yacht On exiting the Yacht Maintenance form I return to the main form The combo box in the main form doesn't list the yacht i just added unless I exit and re-load the form
I'm not sure of the best way to refresh the combo box selections or main form without exiting.
I want a combo box in a form for data entry. Is the best method in doing this creating a new combo box in the form and linking it to a table, or using a lookup field in my table?
I'm trying to create a Data Entry only form based on a small table called tblProject.
It consist of the fields Project_ID, Artist_ID, Project_Name, and Project_Notes.
I used the wizard to get me started and i know how to change the form to data entry only, but the problem is the vague data in the Artist_ID control. It shows up as a number, because it is an FK to another table (tblArtist) where more details on the artist are held. (including Band_Name)
I want to be able to make it a combobox with a list of the Band_Names from the tblArtist table. This would make creating "a new project" much easier.
On a form to enter some new client info, I want users to be able to select their UserID from a combo box for future reference to other users (ie; Who made these notes?). For various reasons I want them to be able to add their UserID to the combo list for future selection if its not already on there.
There is a table set up for users, simply called tblUsers, with a single field, UserID. A query from this sorts the list alphabetically, and the combo uses this query to populate its list - qryUserID.
Users can currently select from a list or write their own UserID in the box, however when they write their own ID it doesn't get saved.
I don't need any message boxes or checking, just add it and move on kind of thing. It doesn't need to refresh the list immediately, as the user moves on swiftly once completing 2 more fields.
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.
I have a combo box that is not tied to any control but uses a value list as the row source in the data tab. My question is... it currently holds two names but I am wanting to add a third but when I do the third name does not appear like the first two in the form view. The first two show:
Last Name, First Name, employee #
And the third shows Last Name, First Name
employee #
And on the third entry... the first name shows where the employee # should be
I am using Access 2003 and I am having trouble with a Combo Box on a form.
I had a combo box (based on a table), storing the choice in a field in the query and underlying table the form is based on. Everything was working fine, until... I altered the form based on a query. Now when you make a choice from the drop down list you get an error bell and nothing happens.
I have one field AccountName in customer table and another field AccountID.
In my form I would like to select from the combo box AccountName during data entry and then have the AccountID automatically update in the Account ID field.