开发者

MS Access: How to Programmatically Add a Subform

开发者 https://www.devze.com 2023-01-28 01:22 出处:网络
Is there a way to programmatically add a subform to a form using Access VBA?I have a temporary table that is generated dynamically when requested by the user.If possible, I would like to create a form

Is there a way to programmatically add a subform to a form using Access VBA? I have a temporary table that is generated dynamically when requested by the user. If possible, I would like to create a form based on the temporary table and add it as a subfo开发者_开发知识库rm to a pre-existing form.


The best bet is to create the subform control and set the source object to either a table or a query.

Me.NameOfSubformControl.SourceObject = "Query.Query1"
Me.NameOfSubformControl.SourceObject = "Table.Temp"

It is also possible to update the sql of a saved query to reference the new temp table.

0

精彩评论

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

关注公众号