I did something similar several years ago and this is how I did it.
The time for each event (avi) needs to be stored in the table as a number in it's lowest common denominator (minutes) , not as a Date/Time. This makes it easy to sum. Put it on the form as an invisible control, ie 'timno'...
The following code will return the format as defined by the users pc.
Function GetDateFormat() As String
'Routine returns user format for dates
On Error Resume Next
Select Case Left(CStr(DateSerial(1995, 12, 31)), 2)
Case "12"
GetDateFormat = "mm/dd/yyyy"...
You might also check to see if you are saving the formatting. There may be a '-'??
If your format is numeric, you may need to look for 0.
Just guessing!
Once you begin entering info into a record, the autonumber is assigned. Even if you escape out of the record so it is not added to the table, the number has still been assigned. The only thing you can do (I think) is to compact and repair the database, which will only reinstate numbers at the...
One option would be to open an invisible form from the AutoExec macro (or as your Startup form) with an unload event so when the user closed the app and the form was unloaded, the code would execute.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.