View Full Version : Last record Problem


GeoffO
08-13-2001, 12:07 PM
Hi

I have a textbox on a form which displays the number of the last record entered.

=Last([Table1]![ID Number])

Then problem is when I enter a new record and save it, the last record field
doesn't update until I close the form and re-open it. How do I make it update
automatically?.

Geoff

AlanS
08-14-2001, 06:20 AM
Have you tried explicitly using the Requery method of the text box (or of the form) after the new record is saved?

GeoffO
08-14-2001, 01:19 PM
Hi

How do you do that Alan?

Thanks

AlanS
08-15-2001, 05:48 AM
In your VBA code:

MyTextBox.Requery 'requery text box
Me.Requery 'requery current form

GeoffO
08-15-2001, 01:16 PM
Thanks Alan

I managed to get it to work before I read your post by changing the textbox to a listbox then refreshing the form on the save record form.

I will try your way as a textbox looks better than a list box.

Thanks

Geoff