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
|
|||
|
|||
Pop up selection to form field
I have a form. In that form, I have a popup button that displays a list. What I want to do is link that list to a field on the form. ie. someone selects a name from the popup list, the popup closes and the item that was clicked, is inserted in the field.
I am very new at this and find it a bit of a challenge. Thanks Jeremy Submitted via EggHeadCafe - Software Developer Portal of Choice What's New for Developers in SharePoint 2010 Object Model? http://www.eggheadcafe.com/tutorials...evelopers.aspx |
#2
|
|||
|
|||
Pop up selection to form field
Try it like this
In the after update event for the popup list Private Sub [PopupListName]_AfterUpdate() If Not IsNull(Me.PopupListName) Then Forms!MainFormName.[NameOfTheControl] = Me.PopupListName DoCmd.Close acForm, Me.Name End If End Sub The above may need some adjustments to work for your forms. Replace PopupListName with the name of your popup list. Replace MainFormName and NameOfTheControl with the names of your forms and controls. The square brackets [] are only needed around names for fields and controls that have spaces in them. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia Jeremy Hatcher wrote in message ... I have a form. In that form, I have a popup button that displays a list. What I want to do is link that list to a field on the form. ie. someone selects a name from the popup list, the popup closes and the item that was clicked, is inserted in the field. I am very new at this and find it a bit of a challenge. Thanks Jeremy Submitted via EggHeadCafe - Software Developer Portal of Choice What's New for Developers in SharePoint 2010 Object Model? http://www.eggheadcafe.com/tutorials...evelopers.aspx |
Thread Tools | |
Display Modes | |
|
|