If statement : set focus problem (1 Viewer)

virencm

Registered User.
Local time
Today, 13:14
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:

vbaInet

AWF VIP
Local time
Today, 04:14
Joined
Jan 22, 2010
Messages
26,374
It's basically:
Code:
If Msgbox(...) = vbNo Then
 

virencm

Registered User.
Local time
Today, 13:14
Joined
Nov 13, 2009
Messages
61
Thank you!!. it works perfectly.
Thanks for the quick reply.
 

Users who are viewing this thread

Top Bottom