Minggu, 05 Juni 2011

RE: [MS_AccessPros] Open Query Design, Close the Show Table dialouge box, Switch to SQL View

 

Steve-

One wonders why you would ever want to do this!?!??

RunCommand acCmdNewObjectDesignQuery

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of sspatriots
Sent: Monday, June 06, 2011 5:28 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Open Query Design, Close the Show Table dialouge box,
Switch to SQL View

Can someone tell me what I need to do do the code below to perform what I have
in the subject line? Right now it opens a Wizard window for Queries and not the
Query Design button. I'm using Access 2007.

Public Function openNewQry()

On Error GoTo ErrHandler

SendKeys "~", False
RunCommand acCmdNewObjectQuery
RunCommand acCmdSQLView

Exit Function

ErrHandler:

MsgBox "Error in openNewQry( )." & vbCrLf & vbCrLf & _
"Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
Err.Clear

End Function

Thanks,

Steve

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar