Ok, well my reference to the fields were incorrect. Here is the new code:
if (Page7.NameofReferralSource.rawValue == null){
xfa.host.messageBox("You must enter the the Name of your Referral on the bottom of Page 7 to be able to print this form");
}else{
Print_Form.execEvent("click");
}
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
The first part that checks for an empty field and displays a message works however the print dialog still pops up after the user clicks ok to the error message. Any ideas?