G
Guest
I am trying to verify certain fields have data prior to allowing the user to
close the form. Here is the code (which does not work). I leave the fields
blank and don't get the error message. Any help is appreciated.
Do While IsNull([Forms]![fTaxDetails New]![IndText])
MsgBox "Please select a taxability", vbOKOnly
Exit Do
Loop
Do While IsNull([Forms]![fTaxDetails New]![SalesUseInd] And
[Forms]![fTaxDetails New]![RentalInd] And [Forms]![fTaxDetails
New]![LeaseINd] And [Forms]![fTaxDetails New]![ConsumerUTInd])
MsgBox "You must select a tax type(s)", vbOKOnly
Exit Do
Loop
DoCmd.Close acForm, "ftaxdetails new", acSaveYes
Kindest regards,
Wayne
close the form. Here is the code (which does not work). I leave the fields
blank and don't get the error message. Any help is appreciated.
Do While IsNull([Forms]![fTaxDetails New]![IndText])
MsgBox "Please select a taxability", vbOKOnly
Exit Do
Loop
Do While IsNull([Forms]![fTaxDetails New]![SalesUseInd] And
[Forms]![fTaxDetails New]![RentalInd] And [Forms]![fTaxDetails
New]![LeaseINd] And [Forms]![fTaxDetails New]![ConsumerUTInd])
MsgBox "You must select a tax type(s)", vbOKOnly
Exit Do
Loop
DoCmd.Close acForm, "ftaxdetails new", acSaveYes
Kindest regards,
Wayne