Z
zufie
I have a query that returns every fifth record after clicking a
command button.
The query returns the correct number of records, but an Enter
Parameter Value box pops up for each of the start date and end date
text boxes?
I checked for parameters on the query, there are none.
Any ideas?
Thanks,
John
Here is the code behind my query:
SELECT [IBCCP Referral].[Caller ID], [IBCCP Referral].CallTaker,
[IBCCP Referral].ProviderNameNumber, [IBCCP Referral].HowHear, [IBCCP
Referral].[IRIS Referral Number], [IBCCP
Referral].LanguagePreferenceID, [IBCCP Referral].Age, [IBCCP
Referral].SecondaryPhone, [IBCCP Referral].WorkPhone, [IBCCP
Referral].PrimaryPhone, [IBCCP Referral].Address, [IBCCP
Referral].City, [IBCCP Referral].Zip, [IBCCP Referral].[County Code
ID], [IBCCP Referral].[Routine Screening], [IBCCP Referral].Comments,
[IBCCP Referral].DateSent, [IBCCP Referral].SentTo, [IBCCP
Referral].QualityAssurance, [IBCCP Agencies].Name, [IBCCP
Referral].ChckIBCCP, [IBCCP Referral].ChckOtherReferral, [IBCCP
Referral].OtherReferralAgency, [IBCCP Referral].ChckIBCCP, [IBCCP
Referral].ChckOtherReferral, [IBCCP Referral].[First Name], [IBCCP
Referral].[Middle Initial], [IBCCP Referral].[Last Name],
qryEvery5thQuery.CallDate
FROM ([IBCCP Referral] INNER JOIN [IBCCP Agencies] ON [IBCCP
Referral].AgencyID = [IBCCP Agencies].ID) INNER JOIN qryEvery5thQuery
ON [IBCCP Referral].[Caller ID] = qryEvery5thQuery.[Caller ID]
GROUP BY [IBCCP Referral].[Caller ID], [IBCCP Referral].CallTaker,
[IBCCP Referral].ProviderNameNumber, [IBCCP Referral].HowHear, [IBCCP
Referral].[IRIS Referral Number], [IBCCP
Referral].LanguagePreferenceID, [IBCCP Referral].Age, [IBCCP
Referral].SecondaryPhone, [IBCCP Referral].WorkPhone, [IBCCP
Referral].PrimaryPhone, [IBCCP Referral].Address, [IBCCP
Referral].City, [IBCCP Referral].Zip, [IBCCP Referral].[County Code
ID], [IBCCP Referral].[Routine Screening], [IBCCP Referral].Comments,
[IBCCP Referral].DateSent, [IBCCP Referral].SentTo, [IBCCP
Referral].QualityAssurance, [IBCCP Agencies].Name, [IBCCP
Referral].ChckIBCCP, [IBCCP Referral].ChckOtherReferral, [IBCCP
Referral].OtherReferralAgency, [IBCCP Referral].ChckIBCCP, [IBCCP
Referral].ChckOtherReferral, [IBCCP Referral].[First Name], [IBCCP
Referral].[Middle Initial], [IBCCP Referral].[Last Name],
qryEvery5thQuery.CallDate;
Here is the code behind my command button:
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
command button.
The query returns the correct number of records, but an Enter
Parameter Value box pops up for each of the start date and end date
text boxes?
I checked for parameters on the query, there are none.
Any ideas?
Thanks,
John
Here is the code behind my query:
SELECT [IBCCP Referral].[Caller ID], [IBCCP Referral].CallTaker,
[IBCCP Referral].ProviderNameNumber, [IBCCP Referral].HowHear, [IBCCP
Referral].[IRIS Referral Number], [IBCCP
Referral].LanguagePreferenceID, [IBCCP Referral].Age, [IBCCP
Referral].SecondaryPhone, [IBCCP Referral].WorkPhone, [IBCCP
Referral].PrimaryPhone, [IBCCP Referral].Address, [IBCCP
Referral].City, [IBCCP Referral].Zip, [IBCCP Referral].[County Code
ID], [IBCCP Referral].[Routine Screening], [IBCCP Referral].Comments,
[IBCCP Referral].DateSent, [IBCCP Referral].SentTo, [IBCCP
Referral].QualityAssurance, [IBCCP Agencies].Name, [IBCCP
Referral].ChckIBCCP, [IBCCP Referral].ChckOtherReferral, [IBCCP
Referral].OtherReferralAgency, [IBCCP Referral].ChckIBCCP, [IBCCP
Referral].ChckOtherReferral, [IBCCP Referral].[First Name], [IBCCP
Referral].[Middle Initial], [IBCCP Referral].[Last Name],
qryEvery5thQuery.CallDate
FROM ([IBCCP Referral] INNER JOIN [IBCCP Agencies] ON [IBCCP
Referral].AgencyID = [IBCCP Agencies].ID) INNER JOIN qryEvery5thQuery
ON [IBCCP Referral].[Caller ID] = qryEvery5thQuery.[Caller ID]
GROUP BY [IBCCP Referral].[Caller ID], [IBCCP Referral].CallTaker,
[IBCCP Referral].ProviderNameNumber, [IBCCP Referral].HowHear, [IBCCP
Referral].[IRIS Referral Number], [IBCCP
Referral].LanguagePreferenceID, [IBCCP Referral].Age, [IBCCP
Referral].SecondaryPhone, [IBCCP Referral].WorkPhone, [IBCCP
Referral].PrimaryPhone, [IBCCP Referral].Address, [IBCCP
Referral].City, [IBCCP Referral].Zip, [IBCCP Referral].[County Code
ID], [IBCCP Referral].[Routine Screening], [IBCCP Referral].Comments,
[IBCCP Referral].DateSent, [IBCCP Referral].SentTo, [IBCCP
Referral].QualityAssurance, [IBCCP Agencies].Name, [IBCCP
Referral].ChckIBCCP, [IBCCP Referral].ChckOtherReferral, [IBCCP
Referral].OtherReferralAgency, [IBCCP Referral].ChckIBCCP, [IBCCP
Referral].ChckOtherReferral, [IBCCP Referral].[First Name], [IBCCP
Referral].[Middle Initial], [IBCCP Referral].[Last Name],
qryEvery5thQuery.CallDate;
Here is the code behind my command button:
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