Dcount in a query

Z

zufie

I am trying to get my Dcount Mod5 in my query to return every 5th
record.

Here is the:
Field Name: Expr1: DCount("[Caller ID]","IBCCP Referral","[Caller ID]
<= " & [Caller ID]) Mod 5
Total: Group By
Criteria: 0

Don't know if this any more helful to you, but here is theVBA behind
my command button that returns every fifth record:

Private Sub Command108_Click()
On Error GoTo Err_Command108_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmQuery5"

stLinkCriteria = "[CallDate]Between #" & Me.txtBeginQAEvry5th &
"# And #" & Me.txtEndQAStopEvry5th & "#"

Debug.Print stLinkCriteria

DoCmd.OPENFORM stDocName, acNormal, , stLinkCriteria, acFormEdit

Exit_Command108_Click:
Exit Sub

Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click

End Sub


Any suggestions would be wonderful and helpful!

Happy Monday!

Zufie
 
D

Duane Hookom

What are your results?
What is debug.printed as stLinkCriteria?
Is there really a missing space after [CallDate]?
What is the date format at your locale?
Is CallDate a field in your form's record source?
 

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