dbTalk Databases Forums  

HELP! Trying to set Start Up properties in A2K2 / XP

comp.database.ms-access comp.database.ms-access


Discuss HELP! Trying to set Start Up properties in A2K2 / XP in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
RWC
 
Posts: n/a

Default HELP! Trying to set Start Up properties in A2K2 / XP - 11-27-2003 , 04:51 PM






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




Reply With Quote
  #2  
Old   
Scott McDaniel
 
Posts: n/a

Default Re: HELP! Trying to set Start Up properties in A2K2 / XP - 11-28-2003 , 04:41 AM






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

Quote:
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






Reply With Quote
  #3  
Old   
RWC
 
Posts: n/a

Default Re: HELP! Trying to set Start Up properties in A2K2 / XP - 11-29-2003 , 10:24 AM



Thanks!

"Scott McDaniel" <scott (AT) no (DOT) spam.thedatabaseplace.net> wrote

Quote:
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








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.