|
-
October 11th, 2005, 11:08 AM
#1
Filter records [Challenging problem required in here.... Help]
I had a table in access with the following datas:
HTML Code:
Name Machine Training_Type Start_Date
alice c ojt 12/03/03
alice c rc 11/02/05
alice c rc 12/03/05
dennis a ojt 12/03/03
dennis a rc 11/02/05
dennis a rc 12/03/05
james b su 13/06/04
james b rc 11/02/05
james b rc 12/03/05
I'm able to sort them by Name> Machine> Date using following command:
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & App.Path & filenametext(0) & "';Persist Security Info=False"
rs.CursorLocation = adUseClient
query = "select Trg_Records.Employee_Name, Trg_Records.Start_Date, Trg_Records.Machine, Trg_Records.Trg_Type from Trg_Records where Trg_Records.Year <= '" & now_year & "' order by [Employee_Name] asc, [Trg_Records.Machine] asc, [Trg_Records.Start_Date] asc;"
rs.Open query, Con, adOpenDynamic, adLockOptimistic
I would like to make query to only display Training Type "rc" with the latest date. (as shown below)
HTML Code:
Name Machine Training_Type Start_Date
alice c rc 12/03/05
dennis a rc 12/03/05
james b rc 12/03/05
Anyone know how can I do it? Thanks in advance.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|