I have a parameter form to populate the report whose control source "Stored procedure", Form has 3 control and one click event as well as as Set on Report's Input parameter property is
And My Stored procedure is
Here is the form's click event
Problem is when Click the click_event it prompts access default parameter form" enter parameter value". Would you please anyone suggest me , what's wrong with the above scenario or What's missing there . . .
(Application Based on A2003 ADP with Sql 2000 Server)
Code:
@UID=Forms!RPM_Audit_Trail!CboUser,@SDate=Forms!RPM_Audit_Trail!TxtSdate,@EDate=Forms!RPM_Audit_Trail!txtEdate
And My Stored procedure is
Code:
CREATE PROCEDURE dbo.Sp_UserActivity @UID INT , @SDate Datetime , @EDate Datetime AS SELECT dbo.AuditTrailT.AuditiD, dbo.UserT.FullName + ' [ ' + dbo.UserT.LoginName + '] - ' + dbo.DepartMentT.DepartMent AS UserDetails, dbo.AuditTrailT.EventDate, dbo.ATrailEventT.EventType, dbo.AuditTrailT.ObjectiD FROM dbo.DepartMentT RIGHT OUTER JOIN dbo.UserT ON dbo.DepartMentT.DepartMentiD = dbo.UserT.DepartMent RIGHT OUTER JOIN dbo.AuditTrailT ON dbo.UserT.UseriD = dbo.AuditTrailT.UseriD LEFT OUTER JOIN dbo.ATrailEventT ON dbo.AuditTrailT.EventObject = dbo.ATrailEventT.EventID WHERE UserT.Userid=@UID AND dbo.AuditTrailT.EventDate BETWEEN @Sdate AND @EDate GO
Here is the form's click event
Code:
Private Sub BtnPrint_Click() DoCmd.Close DoCmd.OutputTo acOutputReport, "rptaudittrail", "Snapshot Format", "D:\MyADPProject\App\Reports\rptaudittrail.snp", True End Sub
Problem is when Click the click_event it prompts access default parameter form" enter parameter value". Would you please anyone suggest me , what's wrong with the above scenario or What's missing there . . .
(Application Based on A2003 ADP with Sql 2000 Server)
Comment