Default to Last Record?

  • Thread starter Thread starter njkear
  • Start date Start date
N

njkear

Guest
I am building a form for users to add multiple records to the table or database. I am trying to create a form that allows the user to only change one field on the form (for example just the inventory number) and leave the others the same. However, the way I have the form setup now, it either overwrites the current record, or if the user tries to go to another record, it blanks out the rest of the fields. I was thinking of trying to make the default field values become whatever is in the last record, because users many times are entering the same info. in many of these fields. I havn't figured out how to do this or if this is really the best method to achieve this. Any help would be appreciated.

Thanks,
njkear
 
N,

To make your form automatically go to the last record when it is first opened, you can add a line of code to the form's Open Event.

Private Sub Form_Open(Cancel As Integer)

DoCmd.GoToRecord , , acLast

End Sub

To prevent users from changing data to a control, set the locked property of the control to yes.

Regards,
T
 

Users who are viewing this thread

Back
Top Bottom