IF mcheck = 0 thisform.command2.Enabled = .t. mlcl_doc_nm = FoundNumber.doc_number if this.caption = "Save" ..... MESSAGEBOX('Changes have been saved.', 0+64+256,'Information') ELSE * I don't know what code should be here ENDIF ELSE messagebox ('Some of the fields on this form are empty. Please complete the form.',0+64+256,'Information') ENDIFBTW, you can edit your messages if they didn't get any replies yet.
mlcl_doc_nm = FoundNumber.doc_number >mrefdocdispname = thisform.combo1.DisplayValue >mrefpatdispname = thisform.combo2.DisplayValue >mToAddress = thisform.edit2.value >mNotes = thisform.edit1.value > >IF mcheck = 0 > thisform.command2.Enabled = .t. > mlcl_doc_nm = FoundNumber.doc_number > if this.caption = "Save" > update memos set Memos.FromDoc = mRefDocDispName,; > Memos.FromDocNum = mLCL_DOC_NM,; > Memos.ToWhom = mToAddress,; > Memos.NameOfPat = mRefPatDispName,; > Memos.HealthNum = mHealthCard,; > Memos.Contents = mNOTES; > WHERE Memos.MemoRefNum = EditThisReferralLetter.MemoRefNum > MESSAGEBOX('Changes have been saved.', 0+64+256,'Information') > ELSE > messagebox ('Some of the fields on this form are empty. Please complete the form.',0+64+256,'Information') > ENDIF >ENDIF>
If empty(mNotes) > mcheck = mCheck + 1 >endif>