如何使用VBA在MS Access中设置已打开的Query对象的焦点?
我正在做这样的事......
If Application.CurrentData.AllQueries(myqueryname).IsLoaded = True Then
'set the focus
' Export to office links for analysis
CommandBars("Menu Bar").Controls("Tools").Controls("Office Links").Controls("Analyze It With Microsoft Office Excel").accDoDefaultAction
答案 0 :(得分:6)
再次docmd是你的朋友: - )
'set the focus
DoCmd.SelectObject acQuery, myqueryname, False