See if i had one command button how would i get it to change captions when it has been clicked and when its been clicked it changed name and also opens up another new form i had this code in mind but it dosent seem to work.


VB Code:
  1. Private Sub Command2_Click()
  2. If Command2.Caption = "Search" Then
  3. Form2.Show
  4. ElseIf
  5. If Command2.Caption = "Stop Search" Then
  6. Form3.Show
  7. End If
  8. End Sub