Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

13: Type Mismatch Error

Status
Not open for further replies.
Jul 14, 2003
116
0
0
CA
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?
 
How is dimmed CrsDivApprvDt2 ?
If Variant:
CrsDivApprvDt2 = IIf(..., Null)
If Date:
CrsDivApprvDt2 = IIf(..., 0)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top