I think I see your problem:
You're passing variables from SetStartupProperties to ChangeProperty
The thing is, the way you've got ChangeProperty, it doesn't require variables to be passed to it.
So what you need to do is change
Code:
varPropValue = False
to
Code:
varPropValue = True
in your ChangeProperty Function.
The Sub you've got is completely pointless I must say, you could just run the ChangeProperty Function, since that's all that it does anyway.
If you DID want SetStartupProperties() to pass the variables, you'd have to change your ChangeProperty function.
It looks to me like you've copied and pasted the example from the Help file, and then messed around with it.
Paste it back, and don't mess with it, other than to change False to True.
I've pasted it here, with False changed to True just in case:
Code:
Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub
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
Steven
I am a loud man with a very large hat. This means I am in charge