473,379 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

After adding two new tables the disable shift key codes don't work

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

Nov 13 '05 #1
4 2059
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


Nov 13 '05 #2
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



Nov 13 '05 #3
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




Nov 13 '05 #4
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
>
>
>
>
>



Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Albretch | last post by:
.. Can you define the Character Set for particular tables instead of databases? . Which DBMSs would let you do that? . How do you store in a DBMS i18n'ed users' from input, coming over the web...
6
by: PerryC | last post by:
I have search googles and there are hundreds of tips about AllowByPassKey... however, none works for me... well, perhaps I am too new to such high level functionality that it just does not make...
1
by: ANSWER | last post by:
Hi, Is there any way I could disable someone to create a new database and import all of my tables into his database. I make .mde, disable shift+Enter, make logon module but still my tables are...
1
by: simonmarkjones | last post by:
Hi i'm trying to disable the shift key from allowing users to access the design view. I've done a search in groups and know i need to somehow do AllowBypassKey. Everywhere i look there is code...
3
by: SueB | last post by:
Hi. I have been working on an Access Db for awhile and am very close to being ready to hand it over to the person who requested it. There will be one user and the db will reside on a desktop...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
7
by: gokkog | last post by:
Hello, Recently I have the book Programming Pearls. Nice read! Perhaps it is weekend, I cannot understand the following codes well: #define BITSPERWORD 32 #define SHIFT 5 #define MASK 0x1F...
3
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.