hi ng
I got two huge problems:
1)
I have made a database that saves a users username a public variable when
the database opens.
When the database is shot down I wan't to save the time the user is leaving
the database, and in the "mainmenu form" I have made some vba under the
event: "shot down"
here it is:
Private sub form_close
Dim db As Database
Dim RSTOUT As Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "select * from Tbl_BrugerLog"
Set RSTOUT = db.OpenRecordset(strSQL)
With RSTOUT
.AddNew
!Bruger = strUsername
!Tidspunkt = Now()
!Tekst = "Logger af"
.Update
End With
RSTOUT.Close
end sub
My problem is that it seems to reset the global variable just before it is
shotdown, so there is saved no name (the public variable is strUsername).
2) How do I hide the buttom in the right upper-corner that shot down the
database and access it selve?
Thanks in advance
Best regards
Henrik