query oldest pending record

T

twalsh

I have a table that has issues submitted by employees. The Status column is
defaulted to "Pending". I want the ticket workers to be able to hit a command
button that will just present the oldest record with "Pending" in the
"Status" field for them to work. (i dont want to just present them a list of
pending tickets as they have a habit of picking and choosing the easier ones)

Table Architecture:

ID l EmplID l acct_num l Submit_time l Submit_dt l Issue l Status l
Completed_By
 
H

hunterpaw via AccessMonster.com

twalsh said:
I have a table that has issues submitted by employees. The Status column is
defaulted to "Pending". I want the ticket workers to be able to hit a command
button that will just present the oldest record with "Pending" in the
"Status" field for them to work. (i dont want to just present them a list of
pending tickets as they have a habit of picking and choosing the easier ones)

Table Architecture:

ID l EmplID l acct_num l Submit_time l Submit_dt l Issue l Status l
Completed_By

Hi twalsh,

You can try adding this code to your Command Button Click Procedure:

Dim strSQL As String

strSQL = "SELECT TOP 1 * " & _
"FROM MyTableName " & _
"WHERE Status = 'Pending' " & _
"ORDER BY Submit_dt DESC, Submit_time DESC;"

Me.RecordSource = strSQLB
Me.Requery

Best Regards,
Patrick Wood
http://gainingaccess.net
 

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

Top