there may be a way to change a setting in the Access Application itself, but i'm not aware of it.
i have an idea for something you can try, but it's very limited.
as a test, try this.
Step 1 -
enter the following line of code in the Form Load property of your main form.
Me.KeyPreview = True
Step 2 -
In the Key Down property of the form enter the following.
Select Case KeyCode
Case vbKeyF2
' Process F2 key events.
SendKeys "{F11}", False
Case vbKeyF3
' Process F3 key events.
Case vbKeyF4
' Process F4 key events.
Case Else
End Select
Step 3 -
Before you test, make sure in the Startup you specify that the Display Database Window checkbox is unchecked.
Step 4-
Now, open the main form. When you key F2 does it open the database window?
as you can see, i have set it so that when F2 is keyed, SendKeys tells the program to key F11 which will open the database window.
you may need to include this in each form/report, or you may be able to include the code in a module and call it each time it is needed.
i know this is very sketchy. i've never really tried to do this before.
Here's another way. Say you want to use Ctrl-F2 to show the database window.
1. Create a new macro (group).
2. Click the toolbar Macro Names button (or use the menu) to display the Macro Name column.
3. Enter a macro named [red]^{F2}[/red] and set its Action to Select Object.
4. In the Object Type and Object Name parameters, select anything you want.
5. Set the In Database Window parameter to Yes.
6. Save the macro group with the name AutoKeys.
From then on, pressing Ctrl-F2 will run the SelectObject action, and since you said to select the object in the Database Window, the window will be unhidden.
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.