Avatar of Karen Schaefer
Karen Schaefer
Flag for United States of America asked on

dcount - type mismatch

Help with syntax - getting type mismatch on last half of string

Need record count of ReqNo where checkbox (Reviewed...) is true per ReqNo.

Private Sub Reviewed_With_Question_AfterUpdate()
   Dim x As Integer
   Dim nReqNo As String
   
   nReqNo = Me.ReqNo
   x = DCount("ReqNo", "UseCases", "ReqNo =" & nReqNo And [Reviewed With Question] = True)
    If Me.Reviewed = True Then
        Me.Reviewed = False
    End If
    If x > 0 Then
         [Forms]![RequirementsReview]![Reviewed With Question] = True
    Else
         [Forms]![RequirementsReview]![Reviewed With Question] = False
    
    End If
   [Forms]![RequirementsReview]![DateModified] = Date
    Me.DateModified = Date
    Me.Repaint

End Sub

Open in new window

Thanks,  What am I missing.
Microsoft Access

Avatar of undefined
Last Comment
Karen Schaefer

8/22/2022 - Mon
Rey Obrero (Capricorn1)

x = DCount("ReqNo", "UseCases", "ReqNo =" & nReqNo & " And [Reviewed With Question] = True)
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Karen Schaefer

ASKER
Thanks Rey that did the trick.

K
Karen Schaefer

ASKER
Thanks Rey that did the trick.

K
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes