开发者

How can I open a query in datasheet mode in a subform?

I have a subform on a mainform. I want to have it open a query in datasheet view. I tried:

Me.subform.Application.DoCmd.OpenQuery "xxx"

But it just opens the query in the background, not inside the subform.

I know that by creatin开发者_StackOverflow中文版g a form bounded to this query, then I can change de subform's SourceObject to open it inside the subform. However I have here many different queries, I just want to find a simpler way.

EDIT: Maybe something like: Me.subform.OpenQuery "xxx", but I didn't find it.


Set the sub form's Source Object to a query name instead of a form name. In the property sheet, it should look like Query.XXX.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜