First post here. I am trying to resolve an issue in MS Access using VBA where I am getting an error 13 type mismatch when using the DLookup function.
I am looking for two values one string type and one integer type. The string is using a form control value and the integer is just the specific value not contained in any form control. My code looks like this.
If DLookup("[ClientName]", "tblTaskInfo", "[ClientName] = '" & Forms!frmLogEntry!ClientName & "' AND TaskID = 1") Then
strSQL = "UPDATE tblTaskInfo SET TaskStart = Forms!frmLogEntry!SignedDate WHERE [ClientName] = Forms!frmLogEntry!ClientName AND [TaskID] = 1"
If I open the Immediate window and run the function there the ClientName value is returned to me not a null, but when updating the record in the sheet it displays the error and prompts to open the debugger. I have a version of this working fine using ClientNo in place of all ClientName fields, but the problem is in my data the ClientNo may not always be immediately filled out which then causes some of my later Dlookup functions to update and insert records to fail.
Any help would be appreciated.