How to make dates rolling and autofill?

  • Thread starter Thread starter kw
  • Start date Start date
K

kw

Guest
In my Form, I have a "Date" field. If I enter a date for the first record, how can the next record be autofilled with the next date (ie, the next day's date).

Note: I did not want DefaultValue = Date()

Thanks.
 
ok if your entering the date in date format you can simple use this.

dim dbs as database
dim rst as recordset

' gets copy of your dataset
set dbs = currentdb
set rst = dbs.openrecordset("SELECT * FROM tblYourTable", dbopendynaset)
' gotolast record
rst.movelast
' adds one to date of last record
txtDate = rst![fldYourDate] + 1
' free resources
dbs.close

Hope this Helps.

Mitch.
 

Users who are viewing this thread

Back
Top Bottom