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
|
|||
|
|||
inputbox for a combobox (easy)
Any way to set up an inputbox prompt to fill in a combobox. I want an
inputbox to ask for a name. When I input the name I want the combobox to show that name. |
#2
|
|||
|
|||
"dogpigfish" wrote in message:
... Any way to set up an inputbox prompt to fill in a combobox. I want an inputbox to ask for a name. When I input the name I want the combobox to show that name. Something like so?? (I put this on a command button click event) Private Sub cmdPrompt_Click() On Error GoTo ErrorPoint Dim varPrompt As Variant varPrompt = InputBox("Please enter a name.", "Enter Name") ' Name of my combo box is cboSomeName Me.cboSomeName = varPrompt ExitPoint: Exit Sub ErrorPoint: MsgBox "The following error has occurred:" _ & vbNewLine & "Error Number: " & Err.Number _ & vbNewLine & "Error Description: " & Err.Description _ , vbExclamation, "Unexpected Error" Resume ExitPoint End Sub -- Jeff Conrad Access Junkie Bend, Oregon |
#3
|
|||
|
|||
Thanks again
"Jeff Conrad" wrote: "dogpigfish" wrote in message: ... Any way to set up an inputbox prompt to fill in a combobox. I want an inputbox to ask for a name. When I input the name I want the combobox to show that name. Something like so?? (I put this on a command button click event) Private Sub cmdPrompt_Click() On Error GoTo ErrorPoint Dim varPrompt As Variant varPrompt = InputBox("Please enter a name.", "Enter Name") ' Name of my combo box is cboSomeName Me.cboSomeName = varPrompt ExitPoint: Exit Sub ErrorPoint: MsgBox "The following error has occurred:" _ & vbNewLine & "Error Number: " & Err.Number _ & vbNewLine & "Error Description: " & Err.Description _ , vbExclamation, "Unexpected Error" Resume ExitPoint End Sub -- Jeff Conrad Access Junkie Bend, Oregon |
#4
|
|||
|
|||
"dogpigfish" wrote in message:
... Thanks again You're welcome, good luck with your project. -- Jeff Conrad Access Junkie Bend, Oregon |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
combobox value synchronization with actual record? | zlatko | Using Forms | 2 | March 2nd, 2005 10:47 AM |
combobox value synchronization with actual record ? | zlatko | General Discussion | 0 | December 31st, 2004 07:13 PM |
Combobox not displaying expected result. | Mitch | Using Forms | 3 | September 10th, 2004 05:14 PM |
Selective Combobox? | Annelie | Using Forms | 1 | August 20th, 2004 04:08 AM |
decision on Combobox | Tony | New Users | 4 | May 20th, 2004 03:58 PM |