Dear All,
I add two new tables to the database and then the disable shift key codes
don't work. These two new tables are actually created by two queries, and
only these two are in the front end, I didn't manage to move them to the
back end. I work with Access 2k under Win XP.
these are the codes that don't work (it worked for more than a year very
well):
Sub SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "tieniustartup"
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, False
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
ChangeProperty "AllowFullMenus", DB_Boolean, False
ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
ChangeProperty "AllowSpecialKeys", DB_Boolean, False
ChangeProperty "AllowBypassKey", DB_Boolean, False
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
ChangeProperty = False
Resume Change_Bye
End If
End Function
Sub SetStartupProperties1()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "tieniustartup"
ChangeProperty "StartupShowDBWindow", DB_Boolean, True
ChangeProperty "StartupShowStatusBar", DB_Boolean, True
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True
ChangeProperty "AllowFullMenus", DB_Boolean, True
ChangeProperty "AllowBreakIntoCode", DB_Boolean, True
ChangeProperty "AllowSpecialKeys", DB_Boolean, True
ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub
-------
I think this will be the last database I made with Access. I am just scared
by its "liabilty".
Please help,
Thank you for your time, I appreciate very much.
Paul 4 1893
What do you mean by "doesn't work"? Have you changed the property to False,
shut down the database then tried to reopen it only to have the shift key
work?
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Paul T. RONG" <et***@hotmail.com> wrote in message
news:xH******************@news.chello.at... Dear All,
I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end, I didn't manage to move them to the back end. I work with Access 2k under Win XP.
these are the codes that don't work (it worked for more than a year very well):
Sub SetStartupProperties() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, False ChangeProperty "StartupShowStatusBar", DB_Boolean, False ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False ChangeProperty "AllowFullMenus", DB_Boolean, False ChangeProperty "AllowBreakIntoCode", DB_Boolean, False ChangeProperty "AllowSpecialKeys", DB_Boolean, False ChangeProperty "AllowBypassKey", DB_Boolean, False
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 ChangeProperty = False Resume Change_Bye End If End Function
Sub SetStartupProperties1() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, True ChangeProperty "StartupShowStatusBar", DB_Boolean, True ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True ChangeProperty "AllowFullMenus", DB_Boolean, True ChangeProperty "AllowBreakIntoCode", DB_Boolean, True ChangeProperty "AllowSpecialKeys", DB_Boolean, True ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub
-------
I think this will be the last database I made with Access. I am just
scared by its "liabilty".
Please help,
Thank you for your time, I appreciate very much.
Paul
Doug,
Thank you.
I have a dialog form, through a command button to disable the shift key,
codes go:
----
Private Sub Stopshift_Click()
Dim Password As String
Password = "1d6e5j4r8521d"
If Not IsNull(txtpassword) And StrComp(Me.txtpassword, Password,
vbBinaryCompare) = 0 Then
Call SetStartupProperties
DoCmd.Close
Else
MsgBox "Wrong password, please enter again£¡", vbOKOnly +
vbExclamation
Me.txtpassword.SetFocus
Me.txtpassword = ""
End If
End Sub
---
through "Call SetStartupProperties" to use the module I posted last night.
It happens when I click the Stopshift buttom, it just does nothing, silence,
waiting several second, then it generates an error, without error number,
and the database shuts down itself.
all those codes I used in another database for more than a year without any
problem.
I tried those codes in another database, they work well.
So only with this database which is still unfinished.
This morning, when I start the problematic database, and tried to go to the
design view of the problematic dialog form, then it generated a warning,
says:"The Visual Basic for Applications is Corrupt".
I am totally shocked and tried 2 hours more in vain. If you met such case
before please help.
Thank you very much,
Paul T. Rong
Bratislava
Slovakia
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> дÈëÏûÏ¢ÐÂÎÅ
:18********************@rogers.com... What do you mean by "doesn't work"? Have you changed the property to
False, shut down the database then tried to reopen it only to have the shift key work?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Paul T. RONG" <et***@hotmail.com> wrote in message news:xH******************@news.chello.at... Dear All,
I add two new tables to the database and then the disable shift key
codes don't work. These two new tables are actually created by two queries,
and only these two are in the front end, I didn't manage to move them to the back end. I work with Access 2k under Win XP.
these are the codes that don't work (it worked for more than a year very well):
Sub SetStartupProperties() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, False ChangeProperty "StartupShowStatusBar", DB_Boolean, False ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False ChangeProperty "AllowFullMenus", DB_Boolean, False ChangeProperty "AllowBreakIntoCode", DB_Boolean, False ChangeProperty "AllowSpecialKeys", DB_Boolean, False ChangeProperty "AllowBypassKey", DB_Boolean, False
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 ChangeProperty = False Resume Change_Bye End If End Function
Sub SetStartupProperties1() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, True ChangeProperty "StartupShowStatusBar", DB_Boolean, True ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True ChangeProperty "AllowFullMenus", DB_Boolean, True ChangeProperty "AllowBreakIntoCode", DB_Boolean, True ChangeProperty "AllowSpecialKeys", DB_Boolean, True ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub
-------
I think this will be the last database I made with Access. I am just scared by its "liabilty".
Please help,
Thank you for your time, I appreciate very much.
Paul
I deleted the problematic form in Access 2002, and rebuild the form, the
database works in Access 2002 very well, but not in Access 2000.
Paul
"Paul T. RONG" <et***@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:S5******************@news.chello.at... Doug,
Thank you.
I have a dialog form, through a command button to disable the shift key, codes go:
----
Private Sub Stopshift_Click()
Dim Password As String
Password = "1d6e5j4r8521d"
If Not IsNull(txtpassword) And StrComp(Me.txtpassword, Password, vbBinaryCompare) = 0 Then
Call SetStartupProperties
DoCmd.Close
Else MsgBox "Wrong password, please enter again£¡", vbOKOnly + vbExclamation Me.txtpassword.SetFocus Me.txtpassword = "" End If
End Sub
---
through "Call SetStartupProperties" to use the module I posted last night.
It happens when I click the Stopshift buttom, it just does nothing,
silence, waiting several second, then it generates an error, without error number, and the database shuts down itself.
all those codes I used in another database for more than a year without
any problem.
I tried those codes in another database, they work well.
So only with this database which is still unfinished.
This morning, when I start the problematic database, and tried to go to
the design view of the problematic dialog form, then it generated a warning, says:"The Visual Basic for Applications is Corrupt".
I am totally shocked and tried 2 hours more in vain. If you met such case before please help.
Thank you very much,
Paul T. Rong
Bratislava Slovakia
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> дÈëÏûÏ¢ÐÂÎÅ :18********************@rogers.com... What do you mean by "doesn't work"? Have you changed the property to False, shut down the database then tried to reopen it only to have the shift
key work?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Paul T. RONG" <et***@hotmail.com> wrote in message news:xH******************@news.chello.at... Dear All,
I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end, I didn't manage to move them to
the back end. I work with Access 2k under Win XP.
these are the codes that don't work (it worked for more than a year
very well):
Sub SetStartupProperties() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, False ChangeProperty "StartupShowStatusBar", DB_Boolean, False ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False ChangeProperty "AllowFullMenus", DB_Boolean, False ChangeProperty "AllowBreakIntoCode", DB_Boolean, False ChangeProperty "AllowSpecialKeys", DB_Boolean, False ChangeProperty "AllowBypassKey", DB_Boolean, False
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 ChangeProperty = False Resume Change_Bye End If End Function
Sub SetStartupProperties1() Const DB_Text As Long = 10 Const DB_Boolean As Long = 1 ChangeProperty "StartupForm", DB_Text, "tieniustartup" ChangeProperty "StartupShowDBWindow", DB_Boolean, True ChangeProperty "StartupShowStatusBar", DB_Boolean, True ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True ChangeProperty "AllowFullMenus", DB_Boolean, True ChangeProperty "AllowBreakIntoCode", DB_Boolean, True ChangeProperty "AllowSpecialKeys", DB_Boolean, True ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub
-------
I think this will be the last database I made with Access. I am just
scared by its "liabilty".
Please help,
Thank you for your time, I appreciate very much.
Paul
Solved. Thank you all who tried to help.
Paul
"Paul T. RONG" <et***@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:OZ*****************@news.chello.at... I deleted the problematic form in Access 2002, and rebuild the form, the database works in Access 2002 very well, but not in Access 2000.
Paul
"Paul T. RONG" <et***@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ :S5******************@news.chello.at... Doug,
Thank you.
I have a dialog form, through a command button to disable the shift key, codes go:
----
Private Sub Stopshift_Click()
Dim Password As String
Password = "1d6e5j4r8521d"
If Not IsNull(txtpassword) And StrComp(Me.txtpassword, Password, vbBinaryCompare) = 0 Then
Call SetStartupProperties
DoCmd.Close
Else MsgBox "Wrong password, please enter again£¡", vbOKOnly + vbExclamation Me.txtpassword.SetFocus Me.txtpassword = "" End If
End Sub
---
through "Call SetStartupProperties" to use the module I posted last
night. It happens when I click the Stopshift buttom, it just does nothing,
silence, waiting several second, then it generates an error, without error
number, and the database shuts down itself.
all those codes I used in another database for more than a year without any problem.
I tried those codes in another database, they work well.
So only with this database which is still unfinished.
This morning, when I start the problematic database, and tried to go to the design view of the problematic dialog form, then it generated a warning, says:"The Visual Basic for Applications is Corrupt".
I am totally shocked and tried 2 hours more in vain. If you met such
case before please help.
Thank you very much,
Paul T. Rong
Bratislava Slovakia
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> дÈëÏûÏ¢ÐÂÎÅ :18********************@rogers.com... What do you mean by "doesn't work"? Have you changed the property to False, shut down the database then tried to reopen it only to have the shift key work?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Paul T. RONG" <et***@hotmail.com> wrote in message news:xH******************@news.chello.at... > Dear All, > > I add two new tables to the database and then the disable shift key codes > don't work. These two new tables are actually created by two
queries, and > only these two are in the front end, I didn't manage to move them to the > back end. I work with Access 2k under Win XP. > > these are the codes that don't work (it worked for more than a year very > well): > > Sub SetStartupProperties() > Const DB_Text As Long = 10 > Const DB_Boolean As Long = 1 > ChangeProperty "StartupForm", DB_Text, "tieniustartup" > ChangeProperty "StartupShowDBWindow", DB_Boolean, False > ChangeProperty "StartupShowStatusBar", DB_Boolean, False > ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False > ChangeProperty "AllowFullMenus", DB_Boolean, False > ChangeProperty "AllowBreakIntoCode", DB_Boolean, False > ChangeProperty "AllowSpecialKeys", DB_Boolean, False > ChangeProperty "AllowBypassKey", DB_Boolean, False > > 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 > ChangeProperty = False > Resume Change_Bye > End If > End Function > > Sub SetStartupProperties1() > Const DB_Text As Long = 10 > Const DB_Boolean As Long = 1 > ChangeProperty "StartupForm", DB_Text, "tieniustartup" > ChangeProperty "StartupShowDBWindow", DB_Boolean, True > ChangeProperty "StartupShowStatusBar", DB_Boolean, True > ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True > ChangeProperty "AllowFullMenus", DB_Boolean, True > ChangeProperty "AllowBreakIntoCode", DB_Boolean, True > ChangeProperty "AllowSpecialKeys", DB_Boolean, True > ChangeProperty "AllowBypassKey", DB_Boolean, True > > End Sub > > ------- > > I think this will be the last database I made with Access. I am just scared > by its "liabilty". > > Please help, > > Thank you for your time, I appreciate very much. > > Paul > > > > >
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
10 posts
views
Thread by Albretch |
last post: by
|
6 posts
views
Thread by PerryC |
last post: by
|
1 post
views
Thread by ANSWER |
last post: by
|
1 post
views
Thread by simonmarkjones |
last post: by
|
3 posts
views
Thread by SueB |
last post: by
|
14 posts
views
Thread by Sinity |
last post: by
|
10 posts
views
Thread by Robert |
last post: by
|
7 posts
views
Thread by gokkog |
last post: by
| | | | | | | | | | | |