Check status db.Properties

  • Thread starter Stefan van der Hooft
  • Start date
S

Stefan van der Hooft

Hi!

I have a form with 2 keys, one to enable the SHIFT-key and one to disable
the SHIFT-key.
What I want is a text which tells me if the current SHIFT-key is on or off.
So I need to create something that checks the status.

--------------------------------------------------------------------------------------
The code behind the turn on button:
Public Sub Enable_Click()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub

The code behind the turn off button:
Public Sub Disable_Click()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
 
S

Sergey Poberezovskiy

Why not put a value in a table and then have it updated depending on which
button is clicked?
 

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

Top