BobJacksonNCI
Technical User
TIA!
I'm trying, really I am. (Just ask my wife...)
Environment = .ADP using Access 2000 with SQL 7
I have forms that use stored procedures for their record sources. My payroll department has asked me to provide the same forms, but populated with data for the current pay period only, which is two weeks.
I found thread181-641505, which is a help, but I'm still a bit thick as to how to make it work. Payroll uses a selection form with buttons to select working forms where I could add starting and ending date controls. The working forms contain buttons to select by status. I'd like to add the date controls to the selection form and then add a button to the working form that would check for and validate the date entries and add BETWEEN START DATE AND END DATE to copies of the existing stored procedures to get them what they need.
One of the existing stored procedures is:
Alter Procedure MgrTB_spr_Time_Off_Show_New
AS
SELECT
dbo.MgrTB_tbl_Time_Off.FormID_One,
dbo.MgrTB_tbl_Time_Off.FormStatus,
dbo.MgrTB_tbl_Time_Off.EmpLastName,
dbo.MgrTB_tbl_Time_Off.EmpLglFirstName,
dbo.MgrTB_tbl_Time_Off.EmpMidName,
dbo.MgrTB_tbl_Time_Off.Dept,
dbo.MgrTB_tbl_Time_Off.DateOfForm,
dbo.MgrTB_tbl_Time_Off.DtCreated,
--FOLLOWING STRIPS OFF DOMAIN NAME AND ADDS A SPACE BETWEEN FIRST INITIAL AND LAST NAME
substring(dbo.MgrTB_tbl_Time_Off.Submitted_By, CHARINDEX('\',dbo.MgrTB_tbl_Time_Off.Submitted_By)+1,1) + ' ' +
substring(dbo.MgrTB_tbl_Time_Off.Submitted_By, CHARINDEX('\',dbo.MgrTB_tbl_Time_Off.Submitted_By)+2,19) AS Submitted_By
FROM
dbo.MgrTB_tbl_Time_Off
WHERE
dbo.MgrTB_tbl_Time_Off.FormStatus = '1'
ORDER BY
dbo.MgrTB_tbl_Time_Off.EmpLastName,
dbo.MgrTB_tbl_Time_Off.EmpLglFirstName,
dbo.MgrTB_tbl_Time_Off.EmpMidName,
dbo.MgrTB_tbl_Time_Off.DateOfForm DESC
RETURN
===============================================
Again, your assistance IS appreciated!
Bob
I'm trying, really I am. (Just ask my wife...)
Environment = .ADP using Access 2000 with SQL 7
I have forms that use stored procedures for their record sources. My payroll department has asked me to provide the same forms, but populated with data for the current pay period only, which is two weeks.
I found thread181-641505, which is a help, but I'm still a bit thick as to how to make it work. Payroll uses a selection form with buttons to select working forms where I could add starting and ending date controls. The working forms contain buttons to select by status. I'd like to add the date controls to the selection form and then add a button to the working form that would check for and validate the date entries and add BETWEEN START DATE AND END DATE to copies of the existing stored procedures to get them what they need.
One of the existing stored procedures is:
Alter Procedure MgrTB_spr_Time_Off_Show_New
AS
SELECT
dbo.MgrTB_tbl_Time_Off.FormID_One,
dbo.MgrTB_tbl_Time_Off.FormStatus,
dbo.MgrTB_tbl_Time_Off.EmpLastName,
dbo.MgrTB_tbl_Time_Off.EmpLglFirstName,
dbo.MgrTB_tbl_Time_Off.EmpMidName,
dbo.MgrTB_tbl_Time_Off.Dept,
dbo.MgrTB_tbl_Time_Off.DateOfForm,
dbo.MgrTB_tbl_Time_Off.DtCreated,
--FOLLOWING STRIPS OFF DOMAIN NAME AND ADDS A SPACE BETWEEN FIRST INITIAL AND LAST NAME
substring(dbo.MgrTB_tbl_Time_Off.Submitted_By, CHARINDEX('\',dbo.MgrTB_tbl_Time_Off.Submitted_By)+1,1) + ' ' +
substring(dbo.MgrTB_tbl_Time_Off.Submitted_By, CHARINDEX('\',dbo.MgrTB_tbl_Time_Off.Submitted_By)+2,19) AS Submitted_By
FROM
dbo.MgrTB_tbl_Time_Off
WHERE
dbo.MgrTB_tbl_Time_Off.FormStatus = '1'
ORDER BY
dbo.MgrTB_tbl_Time_Off.EmpLastName,
dbo.MgrTB_tbl_Time_Off.EmpLglFirstName,
dbo.MgrTB_tbl_Time_Off.EmpMidName,
dbo.MgrTB_tbl_Time_Off.DateOfForm DESC
RETURN
===============================================
Again, your assistance IS appreciated!
Bob