2012-08-17 54 views
0

我有一個過程創建一個窗體,然後用於子窗體控件。抑制字段列表側邊欄

我通過docmd.echo抑制了視覺創作,但側邊欄字段列表顯示然後退去。

有沒有辦法抑制Field List邊欄?

回答

0

當您重新打開數據庫時,這將適用。用戶可以使用MS Accesss 2010的方法有六種。可以從「選項」菜單手動更改這些方法。

Sub SetStartUp() 
    SetProp "StartupShowDBWindow", True, dbBoolean 
    SetProp "AllowFullMenus", True, dbBoolean 
End Sub 

Sub SetProp(PropName As String, PropVal As Variant, Optional PropType = dbText) 
Dim db As Object 
Dim prp As Object 
Dim strTitle As String 

Const PROPERTY_NOT_FOUND As Integer = 3270 

On Error GoTo ErrorHandler 

    Set db = CurrentDb 

    ' Try to set the property. If it fails, the property does not exist. 
    db.Properties(PropName) = PropVal 

ExitLine: 
    db.Close 
    Set db = Nothing 
    Set prp = Nothing 
    Exit Sub 

ErrorHandler: 
    If Err.Number = PROPERTY_NOT_FOUND Then 
     ' Create the new property. 
     Set prp = db.CreateProperty(PropName, PropType, PropVal) 
     db.Properties.Append prp 
     Resume Next 
    Else 
     Resume ExitLine 
    End If 

End Sub 
+0

最終用戶將有運行時Access,這仍然會工作嗎? – GoldBishop 2012-08-17 17:00:37

+0

你的工作意味着什麼?它會隱藏導航窗格,是的。您可能希望考慮更多選項。 – Fionnuala 2012-08-17 17:02:21

+0

我知道運行時是專業版Office最小化的形式。因此,某些功能不存在或不可用。我只是想確保沒有其他因素需要考慮。 – GoldBishop 2012-08-17 17:03:51