2nd Post for database guru.

J

Jeff

I've already posted once, but I didn't clarify. I'm new to ASP and ADO so I
need a thorough explanation of a fix to my problem if anyone is willing to
take the time.



I have an asp page with a form that is used for signing 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 the form 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 checked out, 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" I would like a message to say this item was
already checked in.

This is to insure that all equipment gets checked back in at the end of each
shift.


Here's the query:

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 get this query to run in the background (without displaying the
data on my page) and how do I code the page to do check the IN/OUT status?
 
D

Duane Hookom

Isn't this an ASP question? You have your query but not your code. To get
ASP code, find an ASP news group.
 

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

Similar Threads


Top