最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

vba - How to set the size of a pop-up subform datasheet to the desired window size below - Stack Overflow

programmeradmin2浏览0评论

Please bear with me as I am new to Access VBA.

I have here a subform with data sheet on it that I would like to display in Pop-Up View.

If Pop Up is No, it displays the whole page.

If Pop Up is Yes, it only displays this below:

These are my properties:

I tried to set Auto Resize to No, same thing happens.

What should I set here in the properties so at least it will automatically display this below:

Pop Up

Please bear with me as I am new to Access VBA.

I have here a subform with data sheet on it that I would like to display in Pop-Up View.

If Pop Up is No, it displays the whole page.

If Pop Up is Yes, it only displays this below:

These are my properties:

I tried to set Auto Resize to No, same thing happens.

What should I set here in the properties so at least it will automatically display this below:

Pop Up

Share Improve this question edited yesterday Gustav 55.9k7 gold badges31 silver badges62 bronze badges asked yesterday ShielaShiela 6911 gold badge9 silver badges23 bronze badges 3
  • I always use Overlapping Windows mode instead of Tabbed Documents in database Options. Try that if you want to control form sizing. Why the VBA tag? You have not provided any VBA for analysis. – June7 Commented yesterday
  • @June7 removed VBA tag. was used to include it. yes, will try ur suggestion. where to update overlapping window, ty – Shiela Commented yesterday
  • @June7 found it. will need to explore. – Shiela Commented yesterday
Add a comment  | 

1 Answer 1

Reset to default 1

Set the form's property AutoCentering to Yes.

Use this code in the OnLoad event to set the width and the height of the form, for example:

Private Sub Form_Load()

    DoCmd.MoveSize , , 12000, 8000

End Sub

Of course, you can also set the Top and Left position, but those are relative to the screen.

发布评论

评论列表(0)

  1. 暂无评论