0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

access vbaとか

Last updated at Posted at 2015-11-21

サブフォームの高さを調節したいときは 親フォーム側でこれ書けばいいみたい。

Private Sub Form_Current()

    Application.Echo False


    'サブフォームの高さを調節
    With Me.サブフォーム名.Form
        Dim q As Integer: q = .Recordset.RecordCount
        Me.サブフォーム名.Height = (q + 1) * .Section(acDetail).Height + .Section(acHeader).Height + .Section(acFooter).Height + Me.サブフォーム名.Top
    End With

    Application.Echo True
End Sub

オートナンバーだと間違えて要素消しちゃった場合に困る って場合はこちらを参考にする
http://hamachan.info/access/o-ton.html

レポートでヘッダをつけないようにする
https://support.office.com/ja-jp/article/%E3%82%B0%E3%83%AB%E3%83%BC%E3%83%97%E5%8C%96%E3%83%AC%E3%83%9D%E3%83%BC%E3%83%88%E3%81%BE%E3%81%9F%E3%81%AF%E3%82%B5%E3%83%9E%E3%83%AA%E3%83%BC-%E3%83%AC%E3%83%9D%E3%83%BC%E3%83%88%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B-6a58e9ab-9f74-4689-83b6-c63cddb2c7f9

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?