Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default value in date filed

Status
Not open for further replies.

Martix

IS-IT--Management
Aug 22, 2001
16
0
0
US
I need to have the field on a form generate a default value for the date based on time of day, basically the reporting for next days business is based on the "shift date". shift date doesnt end until 7am the next day, so after midnight the form is stamping the next days date when in fact i need it to continue stamping the shift date. please help
 
I think you must create a function in module. For example:

Function CheckDate(CurrentTime)
If CurrentTime <= &quot;07:00&quot;
CheckDate = Date() - 1
Endif
End Function


So you can use the function in your procedures or form, like:

CurTime = Time(Date())
ShiftDate = CheckDate([CurTime])


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top