If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding data to combo box
I have a combo box based on a row source and I use this code that I
found from a website for the user to add items other than those in the combo box. The problem is the items dont save in the combo box. Is there any way to get them to save? Private Sub Clothing_Size_NotInList(NewData As String, Response As Integer) 'Suppress the default error message. Response = acDataErrContinue 'Prompt user to verify if they wish to add a new value. If MsgBox(" " & NewData & " is not in list. Add it?", vbYesNo) = vbYes Then 'Add a new Size to the list with the value from the variable NewData. [Clothing Size].RowSource = [Clothing Size].RowSource & ";" & NewData 'Inform the combo box that the desired item has been added to the list. Response = acDataErrAdded End If End Sub |
#2
|
|||
|
|||
Adding data to combo box
Check this link on how to add record to combo
http://www.databasedev.co.uk/not_in_list.html -- Good Luck BS"D " wrote: I have a combo box based on a row source and I use this code that I found from a website for the user to add items other than those in the combo box. The problem is the items dont save in the combo box. Is there any way to get them to save? Private Sub Clothing_Size_NotInList(NewData As String, Response As Integer) 'Suppress the default error message. Response = acDataErrContinue 'Prompt user to verify if they wish to add a new value. If MsgBox(" " & NewData & " is not in list. Add it?", vbYesNo) = vbYes Then 'Add a new Size to the list with the value from the variable NewData. [Clothing Size].RowSource = [Clothing Size].RowSource & ";" & NewData 'Inform the combo box that the desired item has been added to the list. Response = acDataErrAdded End If End Sub |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
from text to combo | brown_eyes | Using Forms | 8 | April 13th, 2006 04:22 PM |
Excel Macro to Copy & Paste | [email protected] | Worksheet Functions | 0 | December 1st, 2005 01:56 PM |
PST file has reached maximum size | Jeff C | General Discussion | 2 | October 6th, 2005 01:35 PM |
Combo Box, Adding more data to ready values - the NotInList thing | Jack | General Discussion | 5 | January 26th, 2005 02:33 AM |
Pulling data from 1 sheet to another | Dave1155 | Worksheet Functions | 1 | January 12th, 2005 05:55 PM |