alexkeel79
MIS
Hello,
I'm having an issue with a piece of my Access VBA Module. The Module imports data from a Microsoft Word form into the Access DB. In one part of the module I am trying to set a variable = a date field on the form:
CrsDivApprvDt2 = IIf(IsDate(doc.FormFields("CrsDivApprv2Dt").Result), doc.FormFields("CrsDivApprv2Dt").Result, "")
If the field is populated the module runs fine but if it is empty I get a "13: Type Mismatch Error". I use a similar line later on when importing the data field into the database and it works fine. Any suggestions?
I'm having an issue with a piece of my Access VBA Module. The Module imports data from a Microsoft Word form into the Access DB. In one part of the module I am trying to set a variable = a date field on the form:
CrsDivApprvDt2 = IIf(IsDate(doc.FormFields("CrsDivApprv2Dt").Result), doc.FormFields("CrsDivApprv2Dt").Result, "")
If the field is populated the module runs fine but if it is empty I get a "13: Type Mismatch Error". I use a similar line later on when importing the data field into the database and it works fine. Any suggestions?