Hey..just a quickie question: Normally when a form opens, it displays the first record in the table first. How can we make the last record added in the table to display first in the form.
Thanks
Hey..just a quickie question: Normally when a form opens, it displays the first record in the table first. How can we make the last record added in the table to display first in the form.
Thanks
In the onload event in the properties section of the form insert this code:
Code:Private Sub Form_Load() DoCmd.GoToRecord , , acLast Forms!YourFormName.FieldNameToHaveCursorSetTo.SetFocus End Sub
I did not understand the 'FieldNameToHaveCursorSetTo' part of it..but i got it eventually...in the properties of the form, click on load, macro builder, in the list I selected Go To record and typed in the form and the field, set the Record to LAST and its good to goThanks anyways...
I did not understand the 'FieldNameToHaveCursorSetTo' part of it
What is the name of the field you want to have focus set to when you open the form? Just substitute your field name in that part of the VBA code.
Alan