-
Kenneth,
I would change
[vba]Private Sub Workbook_Open()
UpdateMDB "Open"
End Sub[/vba]
to set a value for a global variable (opentime) and then change
[vba]If wbEvent = "Open" Then Recordset("OpenDate") = Now
If wbEvent = "Close" Then Recordset("CloseDate") = Now[/vba]
to
[vba]If wbEvent = "Close" Then Recordset("OpenDate") = opentime
If wbEvent = "Close" Then Recordset("CloseDate") = Now
[/vba] This creates a single record containing both the open and close time.
This could use a bit of a tidy up but it works.
BH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules