Macro message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a combo box which has a number of years in it (i.e. 2000, 2001, 2002
up to 2015). Whenever I select any one of them, I want the year selected to
be included in a msg that comes up in a macro. Example, "You have selected
2002".

I know how to do a normal msg on a macro, but I don't know how to include
something from a text, list or combo box fon it.

Please help me on this ASAP.

Al
 
The Message argument for the macro would be this:

="You have selected " & [ComboBoxName]
 
use = at the start of the text to indicate it's an expression.

="You have selected" & [Forms]![FormName]![FieldName]

....and you obviously need to call this macro on the after update of the
combo box.

alternatively, if you wanted to do it in code (an event procedure), then the
following should do it.

Private Sub FieldName_AfterUpdate()
MsgBox "You have selected " & Me!FieldName
End Sub

hth.
 
Back
Top