Close Button

  • Thread starter Thread starter solex
  • Start date Start date
S

solex

Tommy,

What is it exactly are you trying to accomplish. If you need to do some
clean up before the database is closed you can open a hidden form when the
database is opened and in the unload event of the form perform some
function.
Dan
 
I know that you can enable/disable the close and max/min buttons on a form
by using the form properties. Is there a way that you can disable the close
buttons on an entire database, so the user would have to close the database
through a button on the form?

thanks for you help in advance.

T. Martin
 
Dan,

I believe that would do what I want to do. I am trying going to keep a
table that logs whenever a user logs in and out of the database. Part of my
open process will be to open a form and log a "Session" number as to when
they logged in. When they close the database, I want to log what time they
logged out of the database.

thanks

Tommy
 
Tommy

Try it like this...

On the Load event of the form, set the Tag property to something, for
example...
Me.Tag = "NoClose"

On the Unload event of the form, then something like...
If Me.Tag = "NoClose" Then
Cancel = True
MsgBox "Use the 'Exit' button on the form"
End If

And on the Click event of the button you want them to use...
Me.Tag = ""
<your timestamp logging code>
DoCmd.Quit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top