MS Accessのshiftキー押しながら起動を無効に

'Shiftキー有効無効を切り替える関数
Function ChangeProperty(strPropName As String, propType, propValue) As Integer
    Dim dbs As Database, prp As Property
    Const conPropNotFoundError = 3270
    Set dbs = CurrentDb
    dbs.Properties(propName) = propValue
    ChangeProperty = True
End Function

'Shiftキーを有効にする場合
ChangeProperty "AllowBypassKey", dbBoolean, True

'Shiftキーを無効にする場合
ChangeProperty "AllowBypassKey", dbBoolean, False

MS Accessのオートナンバーの開始値を変更

ADOX(Microsoft ADO Ext. 2.X for DDL and Security)の参照設定が必要。

    Dim startNo As Long
    startNo = InputBox("開始Noを指定してください。")

    Dim cat As New ADOX.Catalog
    Set cat.ActiveConnection = CurrentProject.Connection
    With cat.Tables("テーブル名").Columns
        .Item("フィールド名").Properties("Seed") = startNo
        .Refresh
    End With
    Set cat = Nothing