Showing last record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form named Notes and has a field named [NoteNumber] .when it opens it takes the user to add a new note. But I want to have a testbox where i want to display the last note number. What sould be the code for that

Any help is appreciated?
 
Probably the easiest way is to use DMax(). If your number is a true number
(not text) the code would be something like (aircode):

Sub Form_Open()

Me.txtNoteNumber= DMax("NoteNumber", "YourTableName")

End Sub

Pango said:
I have a form named Notes and has a field named [NoteNumber] .when it
opens it takes the user to add a new note. But I want to have a testbox
where i want to display the last note number. What sould be the code for
that?
 
Back
Top