Most recent row based on category value in query

mba_110

Registered User.
Local time
Today, 02:04
Joined
Jan 20, 2015
Messages
280
Hi everyone,


I am trying to call most recent value of data row of table entry based on category and employee ID selection.

Table Fields

[EmpID] number format
[Category] Combo Box Value list
[PayDate] Date format
[Amount] number format


Their is multiple entries for each employee with different categories but i want to call the latest entry based on [PayDate] for each category and for each employee in query.

Can anyone help me with this, i dont know exactly what function and its parameter need to use.

thanks.
 
I am trying to call most recent value of data row of table entry

Huh?

Can you demonstrate your issue with data? Provide 2 sets:

A. starting sample data from your table. Include table and field names and enough data to cover all cases.

B. Expected results. Show what data you expect returned based on the starting data in A.
 
I have attached snap of my table where all fields are not necessary to call in query however, based on further requirements i will do modify the code to include the another fields from table but so far i need the fields mentioned in my first post.

What i need to achieve is a latest entry of the employee, filter by (PaymentCategory,PaymentType,Gender,PayDate) so, if emp 1 is having any of these entry by (PaymentCategory,PaymentType,Gender,PayDate) should come Separately in query based on my filtration.


Case 1:

if i need to call latest [Amount] by [paydate] for [emp id] 1 and for [Paymentcategory] medical then it should show me the latest date entry by [paydate] field for [PaymentCategory] medical and [EmpID] 1 and i should be able to add more filters mentioned in below case 2.

The identification of latest row is based on [Paydate]

tblDependants [EmpID] is FK of tblEmployees [EmpID] PK

Case 2 :

Filters that i am going to call upon

[Paydate]
[PaymentType]
[EmpID]
[Gender]
[PaymentCategory]


by filtering any of above i need to call complete row from tblDependants.

i hope it make sense.
 

Attachments

  • Untitled.png
    Untitled.png
    22 KB · Views: 133
I need data. Starting data and then expected results.
 

Users who are viewing this thread

Back
Top Bottom