Need help in DCount Function in MS Access

F

FA

Hi, I have a report which has a label called Screenshots. I want this
label to be visible only if there is any screen shot for a particular
FINDG_NO. below is my code that i put in the detail section of OnFormat
event. its giving me the error that you canceled the previous action.
Can somebody help me out please

Dim stLinkCriteria As String
stLinkCriteria = "[FINDG_NO]=" & Me![FINDG_NO]
If DCount("*", "dbo_ScreenShot", _
stLinkCriteria) > 0 Then
Me.Screenshots.Visible = True
Else
Me.Screenshots.Visible = False
End If

Thanks
Moe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top