Solved

Access ShortCut PLEASE

Posted on 2014-09-21
11
333 Views
Last Modified: 2014-09-22
Hello All,

i end up several times going to query designer and start writing up my own sql (instead of using the query wizard or choosing tables from the menu to add to the query designer. What is the shortcut t that will directly open a blank query window where I could directly start writing sql?

I am asking because I end doing this so often that i think it will make sense to use a shortcut to directly open a new blank query window like attached

Thank you
queryBlankWindwo.jpg
0
Comment
Question by:Rayne
  • 4
  • 3
  • 2
  • +1
11 Comments
 

Author Comment

by:Rayne
ID: 40336004
like a ctrl + N ? not sure for new query?
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40336119
I'm not aware of there being a keyboard shortcut.

I looked to see whether there is an icon you can add to the Quick Access Toolbar but it does not appear to be an option there either.  I also looked through the RunCommand constants, and I don't see one that could be used to do this.

You could create a query, something like "SELECT * FROM SomeTable", change it over to SQL view, and then save it.  When you need a new query, simply right click on it in the navigation bar and select Design.  That's about as close to what you are looking for as I can think of.
0
 
LVL 1

Accepted Solution

by:
Richard Francis earned 500 total points
ID: 40336131
I don't think there's an option to set the default opening state for a query. However you could create a function, a macro to run that function and then add the macro to your quick ribbon toolbar.

For the function you could use sendkeys e.g.

Public Function sendMyKeys()
    
    sendkeys "%CQD%C%JQWQ"
        
End Function

Open in new window


then set up a runcode macro for that function.

This might not be the best way of doing what you want, but it's the only way I can think of.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40336243
Richard,

I've never been a fan of SendKeys, can you please interpret what that function says?

Dale
0
 
LVL 1

Expert Comment

by:Richard Francis
ID: 40336253
Hi Dale,

No problems:

%C
Selects the "Create" tab on the ribbon.

QD
Opens a new query in design view.

%C
Closes the "Show Table" dialog.

%JQ
Selects the "Design" tab on the ribbon.

W
Selects the "View" drop down

Q
Selects "SQL View"

I tested this in Access 2010 and it worked for me.

I haven't used sendkeys much and there may be reasons not to use it. I'm not aware of any, but it's not a topic that's covered in any great detail in the material I've read.

Richard.
0
 
LVL 57
ID: 40336265
Just wanted to kick in that send keys is it...there's no shortcut I'm aware of either.

No points please.

Jim.
0
 

Author Closing Comment

by:Rayne
ID: 40336778
This is a HUGE lifesaver. Thank you for your brilliance :)
Thank you a million
0
 

Author Comment

by:Rayne
ID: 40336783
thank you again :)
0
 

Author Comment

by:Rayne
ID: 40336785
4-4 clicks reduced to one click, awesome
0
 
LVL 1

Expert Comment

by:Richard Francis
ID: 40336793
No problems, glad to help.

It was my first post too.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question