My form has a combobox [cboRecap] with a list of 4 values Match, No Match, Questionable and Other
Also has a Text Box [txtScore] that is populated with a with a numeric value 1 through 5
On [cboRecap]_afterUpdate, I am trying to populate [txtRecap] with the count of records in my [ZIMatchedAccounts] table where the [DMReview] column = [cboRecap] and [ZI_C_MATCH_SCORE] = [txtScore]
This throws a Run-Time error '2471': The expression you entered as a query parameter produced this error: 'Match'
Code:
Me.txtRecap = DCount("*", "ZIMatchedAccounts", "DMReview = " & Me!cboRecap & " And ZI_C_MATCH_SCORE =" & Me!txtScore)
This one throws Run-Time error 13" Type mismatch
Code:
Me.txtRecap = DCount("*", "ZIMatchedAccounts", "DMReview = '" & Me!cboRecap & "'" And "ZI_C_MATCH_SCORE = '" & Me!txtScore & "'")
This one does not throw an error but it populates [txtRecap] with a zero
Code:
Me.txtRecap = DCount("*", "[ZIMatchedAccounts]", "[ZI_C_MATCH_SCORE]" = Me.txtScore & "DMReview" = Me!cboRecap)