![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have just converted a database from A97 to A2K2. I had a procedure for changing start up properties that worked really well. For some reason, they don't work in A2K2 and I'm having a tough time finding out what the "replacement values" are. These are the items I'm trying to change; ChangeProperty "AllowSpecialKeys", dbBoolean, True ChangeProperty "AllowByPassKey", dbBoolean, True ChangeProperty "StartUpShowDBWindow", dbBoolean, True ChangeProperty "AllowBuiltinToolbars", dbBoolean, True ChangeProperty "AllowFullMenus", dbBoolean, True and this is the ChangeProperty code Public Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer On Error GoTo ChangeProperty_Err '************************************************* ************************** ***** '*** Generic Method of changing properties '************************************************* ************************** ***** Dim dbs As Database, prp As Property Const conPropNotFoundError = 3270 Set dbs = CurrentDb dbs.Properties(strPropName) = varPropValue ChangeProperty = True ChangeProperty_Exit: Exit Function ChangeProperty_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 ChangeProperty_Exit End If End Function Any help that anyone could provide would be great. You can reply to the group or just remove the underscores and the caps from my email address. Thanks! RWC |
#3
| |||
| |||
|
|
Add a reference to Microsoft DAO 3.6 ... your code references objects supplied by this library. Also, you should explicity refer to those objects: Dim dbs As DAO.Database Dim rst As DAO.Recordset etc etc "RWC" <hemmingway_REMOVE_SPAM_O_MATIC_ (AT) shaw (DOT) ca> wrote in message news:tdvxb.508518$pl3.154126 (AT) pd7tw3no (DOT) .. Hello, I have just converted a database from A97 to A2K2. I had a procedure for changing start up properties that worked really well. For some reason, they don't work in A2K2 and I'm having a tough time finding out what the "replacement values" are. These are the items I'm trying to change; ChangeProperty "AllowSpecialKeys", dbBoolean, True ChangeProperty "AllowByPassKey", dbBoolean, True ChangeProperty "StartUpShowDBWindow", dbBoolean, True ChangeProperty "AllowBuiltinToolbars", dbBoolean, True ChangeProperty "AllowFullMenus", dbBoolean, True and this is the ChangeProperty code Public Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer On Error GoTo ChangeProperty_Err '************************************************* ************************** ***** '*** Generic Method of changing properties '************************************************* ************************** ***** Dim dbs As Database, prp As Property Const conPropNotFoundError = 3270 Set dbs = CurrentDb dbs.Properties(strPropName) = varPropValue ChangeProperty = True ChangeProperty_Exit: Exit Function ChangeProperty_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 ChangeProperty_Exit End If End Function Any help that anyone could provide would be great. You can reply to the group or just remove the underscores and the caps from my email address. Thanks! RWC |
![]() |
| Thread Tools | |
| Display Modes | |
| |