Return records within whatever date range is entered on Form

Z

zufie

I want my command button & start and stop textboxes to return records
within whatever date range is entered.

Instead what returns is 1 of 1 record (Filtered).

Here is my VBA code behind the command button. That is my On Click
[Event Procedure]:

Private Sub Command108_Click()
On Error GoTo Err_Command108_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmIBCCPReferrals"

stLinkCriteria = "[CallDate]=" & "#" & Me![txtQAStartEvery5thQry]
& "#"
DoCmd.OPENFORM stDocName, , , stDocName

Exit_Command108_Click:
Exit Sub

Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click

End Sub


Thanks for your ideas!
 
Z

zufie

Ok, I got part of it.

I added acNormal to my VBA code so that the form will display in Form
View.

Private Sub Command108_Click()
On Error GoTo Err_Command108_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmIBCCPReferrals"

stLinkCriteria = "[CallDate]=" & "#" & Me![txtQAStartEvery5thQry]
& "#"
DoCmd.OPENFORM stDocName, acNormal

Exit_Command108_Click:
Exit Sub

Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click

End Sub

But, how do I set up a query so that my command button & start and
stop textboxes to return the records
within the date range entered?

Thanks!

John
 

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