In the MessageBox function you need to set it to:
IF MESSAGEBOX("Subject Code Required",2+16) = 4
I changed the second parameter (nDialogType) to use the Retry button and the Question mark. That way, when you click on Retry, the returned value will be 4.
>I am using the below code i am getting the message "Subject Code Required" with the X symbol in the message box. But it is going to the else part. Instead of reading thisform.Container2.cmdsubj.click
>
>***************************Start*************************
>IF MESSAGEBOX("Subject Code Required",6+16) = 4 && RETRY
> thisform.Container2.cmdsubj.click
> ELSE
> thisform.undorecord
> endif
>***************************END***************************
>
>Thank you.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi