Solved

Access ShortCut PLEASE

Posted on 2014-09-21
11
329 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Outlook Free & Paid Tools
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

758 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

21 Experts available now in Live!

Get 1:1 Help Now