![]() |
#2
|
||||
|
||||
![]()
Angelina, I don't use forms in Excel much—ok, I'm not sure I've ever used one in Excel, or maybe once—but I do it in Access some, and I think I see a problem. Let's see whether I follow this. First, if I indent your code to be sure I understand it correctly, it would look like this, right?
Code:
Ret_Type = Msgbox("Clock Number not found. Click OK to enter new employee", vbOKCancel, "Invalid Clock Number") Select Case Ret_Type Case 1 'ok Unload Me Copper_Crusaders_Points.Show MultiPage1.Value = 2 Case 2 'cancel Unload Me Copper_Crusaders_Points.Show MultiPage1.Value = 1 End Select Well, isn't that probably the problem? Whichever button you push in response to the MsgBox, the first thing it does is Unload Me. Immediately the form is unloaded, the code stops executing, and the user is left at that point to his own devices. Certainly I would assume that the Unload statement should come last, after the Show method and setting the value of MultiPage1, like this: Code:
Ret_Type = Msgbox("Clock Number not found. Click OK to enter new employee", vbOKCancel, "Invalid Clock Number") Copper_Crusaders_Points.Show Select Case Ret_Type Case 1: MultiPage1.Value = 2 'Ok Case 2: MultiPage1.Value = 1 'Cancel End Select Unload Me |
|