Neil
Check return value of messagebox. It returns 6 for Yes and 7 for No. If you include foxproh.H thera are constants IDNo and IDYes.
Agnes
>I have a message box with Yes and No buttons to delete a record in a grid.
>
>
>MESSAGEBOX("Are you sure you want to delete this contact?",4,'Delete contact')
>
>
>I would like to delete the record if yes. How do I test whether yes or no has been pressed on the message box?
>
>Many Thanks
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]