If statement : set focus problem

virencm

Registered User.
Local time
Tomorrow, 07:36
Joined
Nov 13, 2009
Messages
61
Hi
Can someone tell me what i am missing in the code below.
what i want it to do is when "yes" is selected on msgbox then go to command1.set focus which is an OK button, if not set focus to the finish date field..

Thank you !

Code:
If me.Percent_Complete= "100" And me.M_Status = "Complete" Then
MsgBox " Is The Finish Date Correct?", vbInformation + vbYesNo, "Finish Date"
If vbNo Then
Me.Finish_Date.SetFocus
Else
Me.command1.SetFocus
End If
Code:
 
Last edited:
It's basically:
Code:
If Msgbox(...) = vbNo Then
 
Thank you!!. it works perfectly.
Thanks for the quick reply.
 

Users who are viewing this thread

Back
Top Bottom