hi,
i want to display last ID in my form field, below code does not work. any solution ?
Private Sub Form_Load()
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
selectQuery = "SELECT ID FROM myTable"
Set rs = CurrentDb.OpenRecordset(selectQuery)
rs.MoveLast
lastRec =...