Solved

Access ShortCut PLEASE

Posted on 2014-09-21
11
332 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
 
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now