Question ShowLastrecord!!

suradj

Registered User.
Local time
Today, 11:05
Joined
May 5, 2010
Messages
21
Dear Friends,

I hope u all are fine. I need some help.

I created 2 tabels (tblusers and tblpayment). tbluser has user information tblpayment hourly payment information.

I created a form named frmHrm. I placed the user information and payment in the form.

The payment of every user can change,so in tblpayment a user john can have different payments.

What i want is when i am openening the form of john i must see the last hoursalary record(that's the most recent one).

I am not so good in dlast,dlookup.

Can u help me please?

See attachment
 

Attachments

Try;
Code:
DoCmd.GoToRecord , , acLast
In the form's On Load event.
 
Dear John,

I tried this code(DoCmd.GoToRecord , , acLast) on both forms, with no result.

tblpayment is related with tblUsers(field: userid)
Relationship: one to many

other code?
 
Base you subform on a query of the payements table and sort by ID Descending.
 
Great man . It worked. Thnx thnx

Do you have a link were i can get more access programming information?
 

Users who are viewing this thread

Back
Top Bottom