[AccessD] MDE & Otter package installers

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Fri Jan 20 11:21:33 CST 2006


Joe:

SOme of the objects, like queries, are still visible unless you do more 
locking:

You can add some locking code like :

Sub SetStartupProperties(TheOpeningForm As String)

If boolTrapErrors = True Then On Error GoTo Err_SetStartupProperties


    ChangeProperty "StartupForm", dbText, TheOpeningForm
    ChangeProperty "StartupShowDBWindow", dbBoolean, False
    ChangeProperty "StartupShowStatusBar", dbBoolean, False
    ChangeProperty "AllowBuiltInToolbars", dbBoolean, False
    ChangeProperty "AllowFullMenus", dbBoolean, False
    ChangeProperty "AllowBreakIntoCode", dbBoolean, False
    ChangeProperty "AllowSpecialKeys", dbBoolean, False
    ChangeProperty "AllowBypassKey", dbBoolean, False
    ChangeProperty "MenuBar", dbBoolean, False
   

Exit_SetStartupProperties:
Exit Sub

Err_SetStartupProperties:

    Select Case Err
    Case 0      '.insert Errors you wish to ignore here
        Resume Next
    Case Else   '.All other errors will trap
        Beep
        DoCmd.OpenForm "frmErrorMessage ", , , , , , "Error: " & 
Err.Number & " - " & Err.Description & vbCrLf & "In: 
ezmrp-opener.SetStartupProperties"
        Resume Exit_SetStartupProperties
    End Select

    Resume 0    '.FOR TROUBLESHOOTING

End Sub

where the change property function:

Function ChangeProperty(strPropName As String, varPropType As Variant, 
varPropValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

Change_Bye:
    Exit Function

Change_Err:
    If Err = conPropNotFoundError Then    ' Property not found.
        Set prp = dbs.CreateProperty(strPropName, _
            varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
    Else
        ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function

Not my code.  I cribbed it from somewhere - the ADH I think.  But you 
also need unlocking code and a back door to get back into your mde.


Rocky


Joe Hecht wrote:
> How locked is my project when I make an MDE or use VSTO or
> other install packages.
>
>  
>
> If I make a label for a text box and caption it auto, can
> they come back & change the caption to car as an example?
>
>  
>
> Joe Hecht
>
> jmhecht at earthlink.net
>
>  
>
>   

-- 
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com




More information about the AccessD mailing list