what is a 'user profile' and how do I... (1 Viewer)

MelB

Registered User.
Local time
Today, 06:29
Joined
Jun 14, 2002
Messages
32
What is a 'user profile' and how do I create one?

What I am trying to do is set the default Access 2000 Options for Keyboard behavior from Behaviour entering field 'select entire field' (which is the dumbest default I can imagine unless you want people deleting things all the time) to 'go to end of field'. It is my understanding that these option are specific to my PC. Correct? I have a small application that I have places on a Citrix server so that 5 people arround the state can share it. Unfortunately the default on the Citrix is 'select entire field'. These are not real computer literate people so I don't want them to have to open Access and change the option before they open my application. Can I do this from code? Or is this 'user profile' what I need?

Any help would be greatly appreciated.... thank in advance!
 

jatfill

Registered User.
Local time
Today, 06:29
Joined
Jun 4, 2001
Messages
150
I'm not sure if this can be accomplished through code since it is an application specific option, not per form. If it's 5 users I would honestly just send them detailed instructions on how to perform this task themselves. In the long run, this is going to save you more time than trying to patch a solution together, especially since it's a "set once, run forever..." kind of thing.

As an option, you could possibly emulate the End keystroke on each field (using the SendKeys statement in Access), but if you have many forms this would probably be much more trouble than its worth, if it even works the way you want it to:

create a macro with the name "GoToEnd" In the action line, select SendKeys, and in the keystrokes field enter {End}

Then add the following code to a form. I tried this & only had luck with it working for the OnClick event, but I think using this statement is just a timing issue when you tab into a text field...

Code:
Private Sub Form_Open(Cancel As Integer)

For Each ctl In Me.Controls
       If ctl.ControlType = acTextBox Then
            If ctl.Value <> "" Then
               Me.Controls(ctl.Name).OnEnter = "GoToEnd"
               
            End If
        End If
        
Next ctl

End Sub

It will need to be tweaked, honestly I've never done much with SendKeys so I don't know if this would be a practical solution or not.
 

rockman

Senior Member
Local time
Today, 03:29
Joined
May 29, 2002
Messages
190
Setting Access application options

Dear Mel,

You posed an interesting question. Frankly, I had no idea how to set the Access options from code. I figured I might have a need to do this myself in the future, so I spent some time with it.

This is what I found:

Application.SetOption "Behavior Entering Field", "2"

The SetOption method has this format: object.SetOption optionname, setting

In the example above, the "2" represents option "Go to end of field".

Thanks for posting an intriguing question!
Jeff
 

jatfill

Registered User.
Local time
Today, 06:29
Joined
Jun 4, 2001
Messages
150
Re: Setting Access application options

rockman said:
This is what I found:

Application.SetOption "Behavior Entering Field", "2"

The SetOption method has this format: object.SetOption optionname, setting

In the example above, the "2" represents option "Go to end of field".

Thanks for posting an intriguing question!
Jeff

rockman, you definitely get the R&D award for that one... excellent stuff!

:D
 

Users who are viewing this thread

Top Bottom