表单大小设计窗口,即使AutoResize = yes(Access 2003) [英] Form sized to design window even though AutoResize = yes (Access 2003)

查看:149
本文介绍了表单大小设计窗口,即使AutoResize = yes(Access 2003)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这让我觉得NUTZ。


我的所有表格都保留了我设计的窗户大小,甚至

当我拥有AutoResize选项设置为Yes。

实际形式(灰色,网格区域)是我想要的大小,但它打开的窗口

不是这个大小。


如果我直接打开表格,即使我选择窗口,

尺寸以适合表格,这也适用。

当我从设计模式切换到查看

模式时,我知道窗体保持设计窗口的大小,但我无法正确调整窗体大小

任何地方!


我尝试添加:

使用DoCmd

.Restore

。 RunCommand acCmdSizeToFitForm

以Form_Open事件结束

,也没有运气。


我试过更换CanGrow / CanShrink选项

页眉/细节/页脚部分......仍然没有变化。


任何建议?

This is driving me NUTZ.

All of my forms are keeping the size of the window I design them in, even
when I have the AutoResize option set to Yes.
The actual form (grey, gridded area) is the size I want it, but the window
it opens in is NOT this size.

This applies if I open the form directly, even if I then choose "Window,
Size to fit form".
I know the form stays the size of the design window when I switch to view
mode from design mode, but I can''t get the form to resize correctly
anywhere!

I''ve tried adding:
With DoCmd
.Restore
.RunCommand acCmdSizeToFitForm
End With
to the Form_Open event, with no luck either.

I''ve tried changing the CanGrow/CanShrink options of the
Header/Detail/Footer sections...still no change.

Any suggestions?

推荐答案

Chippy写道:
这是在驾驶我NUTZ。

我所有的当我将AutoResize选项设置为Yes时,表单会保持我设计的窗口的大小,即使
实际的形式(灰色,网格区域)是我想要的大小,但是它打开的窗口不是这个尺寸。

这适用于我直接打开表格,即使我然后选择窗口,
尺寸以适合形式。<我知道当我从设计模式切换到查看
模式时,表单会保持设计窗口的大小,但我无法在任何地方正确调整表单大小!

我已经尝试添加:
使用DoCmd
.Restore
.RunCommand acCmdSizeToFitForm
结束
到Form_Open事件,也没有运气。

我试过更改
页眉/细节/页脚部分的CanGrow / CanShrink选项...仍然没有变化。

有什么建议吗?
This is driving me NUTZ.

All of my forms are keeping the size of the window I design them in, even
when I have the AutoResize option set to Yes.
The actual form (grey, gridded area) is the size I want it, but the window
it opens in is NOT this size.

This applies if I open the form directly, even if I then choose "Window,
Size to fit form".
I know the form stays the size of the design window when I switch to view
mode from design mode, but I can''t get the form to resize correctly
anywhere!

I''ve tried adding:
With DoCmd
.Restore
.RunCommand acCmdSizeToFitForm
End With
to the Form_Open event, with no luck either.

I''ve tried changing the CanGrow/CanShrink options of the
Header/Detail/Footer sections...still no change.

Any suggestions?



您是否将表单设置为Sizeable? (请参阅表单格式的BorderStyle

设置)


您是否将表单设置为模态或对话框?检查其他选项卡

表格的属性。


Do you have the form set to Sizeable? (see BorderStyle in form''s Format
settings)

Do you have the form set to modal or dialog? Check the Other tab for
the form''s properties.


边框样式=大小

PopUp =否

模态=否


它们应该设置为什么?

我想将这些表格用作制表符控件上的子表单所以我想确定

确保它们的尺寸都正确。


感谢您的帮助


[BTW :当然MS会意识到默认情况下大多数人都希望

表单的大小与表单的大小相同而不是你设计的窗口吗?]
Border Style = Sizeable
PopUp = No
Modal = No

What should they be set to?
I want to use these forms as subforms on a tab control so I want to make
sure they are all sized correctly.

thanks for your help

[BTW: Surely MS would realise that by default most people would want the
form to be the size of the form and not the window you design it on?]

我建​​议:


a)发布所有表单模块,以便我们可以尽可能多地考虑问题

;





b)尝试


Private Sub Form_Load()

DoCmd .RunCommand acCmdSizeToFitForm

End Sub


Private Sub Form_Open(取消为整数)

和我一起

..InsideHeight =。部分(acDetail).Height * 20

''me.note是right-most控制表格

..InsideWidth = Me.Note.Left + Me.Note.Width + 64

结束

结束Sub < b / b
根据您的意愿和表格的设计进行修改。

运行这些代码的事件似乎非常重要
并不令人沮丧,因为在它之前很难确定窗口大小

存在;我从来没有取得过一致的成功

随着DoCmd

.Restore

.RunCommand acCmdSizeToFitForm

结束

,但我有Form_Load事件。

I suggest:

a) posting all your form module so that we might consider the problem
with as much information as possible;

or

b) trying

Private Sub Form_Load()
DoCmd.RunCommand acCmdSizeToFitForm
End Sub

Private Sub Form_Open(Cancel As Integer)
With Me
..InsideHeight = .Section(acDetail).Height * 20
''me.note is the "righthand-most" control on the form
..InsideWidth = Me.Note.Left + Me.Note.Width + 64
End With
End Sub

with modifications appropriate to your wishes and the form''s design.
The event in which these codes are run does seem to be quite important
not surprsingly as it''s difficult to size the from window before it
exists; I have never had consistent success with
With DoCmd
.Restore
.RunCommand acCmdSizeToFitForm
End With
in the Form_Open Event, but I have in the Form_Load Event.


这篇关于表单大小设计窗口,即使AutoResize = yes(Access 2003)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆