J
Jeff
I have 2 asp pages, a sign-in form on one page and a sign-out form on
another. They are used for signing warehouse equipment in and out.
The 3 form fields are:
Employee Name, Equipment Number, and Supervisor Name. Each field has some
simple client side validation.
Here's what I need help with:
Before these forms can be submitted successfully, I would like to run a
query that looks up the last time the same equipment number that is being
entered into the form was checked in or out.
If the status comes back as "OUT" on the sign-out form, I would like an
error to pop up saying that this item needs to be checked back in before it
can be checked out again.
If the status comes back as "IN" on the sign-in form, I would like a message
to say this item is already checked in.
This is to insure that all equipment gets checked back in at the end of each
shift, and to avoid duplicate entries.
Here's the query I came up with:
SELECT TOP 1 RF.Employee_Name, RF.EQUIP_Number, RF.[In/Out],
Max(RF.Entry_Date) AS MaxOfEntry_Date, Max(RF.Entry_Time) AS MaxOfEntry_Time
FROM RF
GROUP BY RF.Employee_Name, RF.EQUIP_Number, RF.[In/Out]
ORDER BY Max(RF.Entry_Date) DESC , Max(RF.Entry_Time) DESC;
How do I code the webpages to run this query, check the IN/OUT status, and
pop up the errors if the wrong data is entered?
I know it's a long winded question, but I've been struggling with this for
a long time and still don't know how to get it done. Any help would be
greatly appreciated.
Thanks in advance.
Jeff
another. They are used for signing warehouse equipment in and out.
The 3 form fields are:
Employee Name, Equipment Number, and Supervisor Name. Each field has some
simple client side validation.
Here's what I need help with:
Before these forms can be submitted successfully, I would like to run a
query that looks up the last time the same equipment number that is being
entered into the form was checked in or out.
If the status comes back as "OUT" on the sign-out form, I would like an
error to pop up saying that this item needs to be checked back in before it
can be checked out again.
If the status comes back as "IN" on the sign-in form, I would like a message
to say this item is already checked in.
This is to insure that all equipment gets checked back in at the end of each
shift, and to avoid duplicate entries.
Here's the query I came up with:
SELECT TOP 1 RF.Employee_Name, RF.EQUIP_Number, RF.[In/Out],
Max(RF.Entry_Date) AS MaxOfEntry_Date, Max(RF.Entry_Time) AS MaxOfEntry_Time
FROM RF
GROUP BY RF.Employee_Name, RF.EQUIP_Number, RF.[In/Out]
ORDER BY Max(RF.Entry_Date) DESC , Max(RF.Entry_Time) DESC;
How do I code the webpages to run this query, check the IN/OUT status, and
pop up the errors if the wrong data is entered?
I know it's a long winded question, but I've been struggling with this for
a long time and still don't know how to get it done. Any help would be
greatly appreciated.
Thanks in advance.
Jeff