Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Access Options

Status
Not open for further replies.

RandyMyers

IS-IT--Management
Apr 28, 2004
85
US
There is an option in Access that is set for each individual computer. I would like to have my application change this setting and even better restore the original value afterwards.

Under, Keyboard, Behavior Entering Field, I want Go To Start Of Field


Any ideas?
 
Ok, this works, however it is not ideal...

Here is what I am doing:

Option Compare Database
Option Explicit
Public StartOption1 As Integer
Public Function SetStartValues()

Application.SetOption "Behavior entering field", 1

End Function
Public Function GetStartValues()

StartOption1 = Application.GetOption("Behavior entering field")

End Function
Public Function ResetStartValues()

Application.SetOption "Behavior entering field", StartOption1

End Function

I call the GetStartValues function and then the SetStartValues function when the main Splash Screen opens. This works just fine.

I call the ResetStartValues function when the Exit System button is click before the application quit command is called. This works, however, if the user clicks the close X in the upper right corner (windows thing) then they will by pass this reset.

Is there any way of setting (or resetting) a value when the application opens or closes and not have the code tide to an event on a form?
 
Isn't the Unload or Close form's event triggered ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes,

However, what if they are on an entry form and just click the X? Unfortunately, end-users do not always follow procedures and return to the main selection screen before exiting the system....

Is there any way to deactivate the X to close Access? Is there anyway to run an event or function when the application closes (quits) without it being related to the form?

This certainly would be preferred....

Again, and as always, I appreciate the suggestions...
 
Ok, I think I have it figured out.

The main selection screen is never closed, but instead just make it invisible and then make it visible again instead of reopening it.

On this main screen have the reset function attached to the unload form event. In this way, no matter where the system is closed from the original values get reset to how they where before opening the application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top