Minggu, 05 Juni 2011

[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

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar