Pop up message

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

Guest

Hello all

I have a combo box on my data base that is used to change the status of a
loan application. Is there a way to have a pop up box ask the user if it is
ok to go to "X" status (Yes/No)???

If user selects Yes, then staus is changed, if user selects no, then does
not change.

Is this possible???
 
You could use the BeforeUpdate event of the combo box to show a message box
and let the user answer the question:

Private Sub comboboxName_BeforeUpdate(Cancel As Integer)
If vbNo = MsgBox("Do you want to change to """ & _
Me.comboboxName.Value & """ status?", _
vbQuestion+vbYesNo+vbDefaultButton1, _
"Change the Status?") Then Cancel = True
End Sub
 
Thanks Ken

Works a treat!

Ken Snell said:
You could use the BeforeUpdate event of the combo box to show a message box
and let the user answer the question:

Private Sub comboboxName_BeforeUpdate(Cancel As Integer)
If vbNo = MsgBox("Do you want to change to """ & _
Me.comboboxName.Value & """ status?", _
vbQuestion+vbYesNo+vbDefaultButton1, _
"Change the Status?") Then Cancel = True
End Sub
 
Back
Top