Display only last record

dbc1

Registered User.
Local time
Today, 04:00
Joined
Mar 7, 2005
Messages
20
Hi, hope you can help me with a small problem. I have a subform (datasheet format) which shows payment and fee records with a current balance displayed for each record. I'd like to only display the balance on the final record, but can't work it out.

Can anyone help by pointing me in the right direction, please?

Thanks very much for all your help, it has been invaluable.
 
Try defining the recordsource of your subform using Dmax, e.g.:

Me.RecordSource = "SELECT * FROM tableName WHERE PrimaryID = DMax("[PrimaryID]","tableName")". In theory this should only display only the last entry in your table which has the highest value in the PrimaryID field.

You may have to expand your "WHERE" clause in there to satisfy your requirement.

I'd be interested to know if it worked or not as I have not tested this.
 
Last edited:
Excellent - thanks for your help; I will post back when I have tested it.
 
Hi, edtab. I tried your suggestion, but this only displays the last record, rather than all the records and the last entry in the specific field. I really need the balance to show accurately and dynamically for each record, rather than every record diosplaying the current balance.

Apologies if this is poorly worded and I appreciate all your help.
 

Users who are viewing this thread

Back
Top Bottom