Disable Min / Max

Sep 8, 2006

Hi

I know how to disable the min / max buttons on a form, but can anybody provide help with disabling the Min / Max buttons of the access application itself, I recently found some code that somebody had posted to disable the "X" button, now I would like to disable the min / max function as well.

Many thanks

Plug

View Replies


ADVERTISEMENT

Disable Shift Key, F11 Etc..

Oct 31, 2005

Hi,

I am just about to set up user level security for my database. Before I do, how do I disable the holding the shift key thing when opening a database to get into the database window?

I want to make it so the users can't see the database window or access the backend data. As I will need to give permissions to use most of the tables, how is this done?

I am using Version: 2002 (10.0) XP

Any help would be much appreciated.

Thanks

View 1 Replies View Related

Disable The [Shift] Key

Apr 26, 2007

I need to disable the [Shift] key so that when the users open my MS Access database, they cannot by pass the open form and display the database window.

We had code that worked correctly with an MS Access 2000 MDB, and even works with an MS Access 2003 ADP, but the same code is ignored by MS Access 2003 MDB.

We add Module named "DisableByPassKey", here is the code...

Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
On Error GoTo Err_SetProperties

Dim prps As AccessObjectProperties
Dim prp As AccessObjectProperty
Dim isPresent As Boolean


Set prps = Application.CurrentProject.Properties
For Each prp In prps
If (StrComp(prp.Name, strPropName, vbTextCompare) = 0) Then
isPresent = True
Exit For
End If
Next

If (isPresent) Then
prps(strPropName).Value = varPropValue
Else
prps.Add strPropName, varPropValue
End If

Exit_SetProperties:
Exit Function

Err_SetProperties:
If Err = 3270 Then 'Property not found
Properties.Append prp
Resume Next
Else
SetProperties = False
MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description
Resume Exit_SetProperties
End If

End Function

The code does not cause an error, it just seems to do nothing. When I set the [Shift] key to "disabled", then re-open the database, the [Shift] key works once again.

If you have any ideas, it would be great.

Thank you!

View 2 Replies View Related

Disable Spaces

Dec 7, 2007

Hi, I have a text box in a from for data entry, how do I disable a space. For example I don't want the user to have a space between charaters or before and after a charater. Thanks.

View 7 Replies View Related

Disable Problem

Jan 19, 2008

The code to disable shift keys at start up that has been posted here numeroous times is causing me problems. I am a complete novice with vba. but i cannot seem to get it to work and there seems to be a problem with the following line of code:-

db.Properties(strPropName) = varPropValue

Can anyone explain what may be going wrong. The shift key still by-passes and no password is asked for. If I do click the button on the start-up screen and enter the password I get error 3270 and the line above is highlighted.

View 3 Replies View Related

Yes/no Enable Disable

May 23, 2005

Here is my problem: When a certain yes/no box is true (checked) other fields on the form are not enabled. That works just find when I am on the record that I click the yes/no field. When I go to another record and then go back to the previous record the fields that should be disabled due to a certain yes/no box being true are now enabled and not disabled. Below is my code. Can anyone tell me what I am doing wrong?

Private Sub Form_Current()

SetCheckBoxes

End Sub

Private Sub SetCheckBoxes()

If Me.StaPrimary = True Then
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaPrimary = False Then
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaPrimaryVerifyDate = ""
Me.StaPrimaryReVerifyDate = ""

End If

If Me.StaUp = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaUp = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaUpVerifyDate = ""
Me.StaUpReverifyDate = ""

End If

If Me.StaBack = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaBack = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaBackVerifyDate = ""
Me.StaBackReverifyDate = ""

End If

If Me.StaOther = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
End If

If Me.StaOther = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOtherVerifyDate = ""
Me.StaOtherReverifyDate = ""

End If

End Sub

View 8 Replies View Related

Disable Button

Jun 30, 2005

I am not sure but this how it should work in VB, I am trying to disable a button that exists on a different form:

ACAudio!Command89.Enabled = False

Where ACAudio is the name of the form and Command89 is the name of the button but I keep getting an error saying object required.

View 4 Replies View Related

Disable Right Click

Nov 30, 2005

Hi, Im currently creating a database for an A-Level project.
I am required to create a database for a real company.
They have asked me to stop the right click function on forms.
I have disabled almost every feature on the forms, however i cannot find a way to disable right click.
Please help.

Pete

View 4 Replies View Related

Disable Button

Jan 21, 2006

I want to disable the button "cmdNew" unless certain criteria are met. Here is the code that runs in Form_Current :

Private Sub Form_Current()

Me.cmdNext.Enabled = (Me.RecordsetClone.RecordCount > Me.CurrentRecord)
Me.cmdPrevious.Enabled = Me.CurrentRecord > 1
Me.cmdLast.Enabled = (Me.RecordsetClone.RecordCount > Me.CurrentRecord)
Me.cmdFirst.Enabled = Me.CurrentRecord > 1

If (Me.cboStatus.Value = "Approved" Or Me.cboStatus.Value = "Approved as Noted" Or IsNull(Me.cboStatus) Or Me.RecordsetClone.RecordCount > Me.CurrentRecord) Then
Me.cmdNew.Enabled = False
Else
Me.cmdNew.Enabled = True
End If

End Sub

The navigation buttons work flawlessly but the cmdNew button still is enabled when it shouldn't be. THe idea is that is will be disabled if:

-current record is not the last record
-cbostatus is blank(null)
-cbostatus is "approved"
-cbostatus is "approved as noted"

The only code that seems to work is the "me.recordsetclone.recordcount > Me.currentrecord" .

Am I going about this the wrong way? How can I check what is in the cbostatus box and have the cmdnew button enabled/disabled based on its value.

Thank you

View 12 Replies View Related

Disable Menus

Jan 30, 2006

I have the following code in the on_load of all of my forms to disable all menus:Dim i As IntegerFor i = 1 To CommandBars.CountCommandBars(i).Enabled = FalseNext iThe problem is that when I open a report in preview mode I cannot close, print, etc.Two questions:1. Is the above approach the best way to disable all menus and toolbars?2. How do I add a custom toolbar (already created) to the report preview only. I've tried doing in in the properties and by me.toolbar = "custom toolbar." Neither approach works. I suspect that the code I've used to disable the menus is keeping me from adding custom menus where I want them?I should also mention that I have also turned off all of the menus, toolbars, etc. in the options/startup.Thanks for your help!

View 2 Replies View Related

Disable VDU Output

Sep 9, 2006

Hi Everyone

Does anyone know how to disable the vdu output to the screen when loading multiple forms etc.

I have an annoying flicker when my main form is reloading.

Thanks in advance for any help,

Kindest regards

Tony

View 1 Replies View Related

Disable Check Box If!!

Feb 8, 2005

I have a combo box "cboSelectEvent" and a check box "ckPartRepl"

what i want is that if "cboSelectEvent" is like "X120*" then "ckPartRepl" would be disabled.

how should i write this and on which event action should i add this?

i think it should be on the lost focus or afterupdate but not sure.

should this work? i have tried it but the box always appears to be usable
Code:if me.cboSelectEvent = "X120*" thenme.ckPartRepl.enabled = falseelseme.ckPartRepl.enabled = trueend if



cheers

Andy

View 1 Replies View Related

'Enter Key Disable????

Mar 9, 2005

I have one form where I want the 'Enter key to be disabled. What is the best way to disable the 'Enter key for this one form without disable'n it for the entire database?

View 1 Replies View Related

Switchboard (Disable Items)

Jul 18, 2005

Hi Folks,

I have created a switchboard that has 8 more sub switchboards. They have got items from 1 to 8. My database is setup with users and their authorised access levels. Admin has level 1, Manager level 2, Users Level3. Now what i want is that when admin logs in all the items in the switchboard must be available, but when a Manager with leve 2 or a user with level 3 logs in to the database then certain items on a specific Switchboard must be diabled For example lets say Sub Switchboard No 3 and its item number 4 (SwitchboardID = 3 and Item Number 4) should be disabled. I tried searching it on the Forum but no use. All i request you is to help me in this issue.


Warm Regards


Darno

View 2 Replies View Related

Disable Access Control Box X

Mar 29, 2006

I searched the forums for this, but only ran across this (http://www.access-programmers.co.uk/forums/showthread.php?t=98554) reference to the access 97 method. Could you please let me know what the access 2003 method for disabling this close box is or provide me criteria to search the access help files?

View 2 Replies View Related

Mde - Disable Menu Options

Apr 20, 2006

I'd like to disable the options to see the table or query design - and control other thing the user can or can't see.

How can I do that?

View 2 Replies View Related

Disable The Mouse Wheel

Jul 26, 2006

Hi everyone. Listen, is there a way to disable the mouse wheel from scrolling through entries in a form? I would like to do this in order to not confuse and upset the user further in the database I am developing, since they do have to enter data into it. Please help me.

Thanks,
LookingMoney

View 2 Replies View Related

How To Disable The Properties Window

Nov 30, 2006

I was hoping someone knows how to disable the ability for users to gain access to the properties window.

When viewing a form (or any object), one can usually right click, click on the corner of the form, or a few other actions and gain access to the properties option. If selected, the properties window is displayed with all the object's properties.

Is there a way to NOT allow the users to select this option? i.e. to disable this option from the menu list?

Thanks for any help you can provide.

-arm1

View 3 Replies View Related

Disable Button On Toolbar

Mar 5, 2007

Hi all,

This has to be simple, but the solution eludes me.

I have a database that works really weel, but I need to do some tweaking to the toolbars to "grey out" the "sort ascending" and "sort descending" icons so that hte users do not mess with those and change how the recoerds display.

There has to be an easy way to disable those two buttons or an alternate way to ensure that the form basically ignores them.

Thanks

mafhobb

View 6 Replies View Related

Disable Ctrl + C In Querys Or The Whole Db

Apr 24, 2007

Hey, I have a database and a login panel and I need to stop some users from using ctrl + c in query's or through out the database. The way I have set the db up is if a user logs in correct then they get directed to the appropriate switchboard. I have already disable all toolbars therefore disabling right click and on my forms I have vba to stop ctrl + c but can't figure out how to do it on queries, I have tried search and searching Google but if I have missed a post please include a link, any help would be appreciated THANKS :)

View 3 Replies View Related

Enable/Disable BypassKey

May 1, 2007

On searching the forum, I found the following post for enabling/disabling BypassKey. I did as instructed but on clicking the label, it gives 'syntax error with 'On Error Goto' in red color and highlighted.

Hello af1112 welcome to the Forum...

I use this code that ghudson supplied at the beginning of this post.

First of all create a copy of your db (Just incase.. )

Now......

Create a label on a form somewhere and make it invisible to other users
(I have mine hidden in my main Switchboard)

The idea is that by clicking on the label you can activate/de activate the code without anyone else knowing about what you are doing..

Name the label "bDisableBypassKey" & hide it somewhere in the corner of your screen or something.

Copy & Paste the code inbetween the bold text to the onclick event of the label you have just created


Private Sub bDisableBypassKey_Click()

On Error GoTo
Err_bDisableBypassKey_Click
'This ensures the user is the programmer needing to disable the Bypass Key
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & "Please key the programmer's password to enable the Bypass Key."
strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")
If strInput = "MY PASSWORD" Then 'Change password to your own
ChangeProperty "AllowBypassKey", DB_BOOLEAN, True

Beep
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & "The Shift key will allow the users to bypass the startup options the next time the database is opened.", vbInformation, "Set Startup Properties"
Else
Beep
ChangeProperty "AllowBypassKey", DB_BOOLEAN, False

MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & "The Bypass Key was disabled." & vbCrLf & vbLf & "The Shift key will NOT allow the users to bypass the startup options the next time the database is opened.", vbCritical, "Invalid Password"
Exit Sub
End If
Exit_bDisableBypassKey_Click:
Exit Sub
Err_bDisableBypassKey_Click:
MsgBox "bDisableBypassKey_Click", Err.Number, Err.Description
Resume Exit_bDisableBypassKey_Click

End Sub


Now paste this code in the Double click event of the same label

Private Sub bDisableBypassKey_DblClick(Cancel As Integer)
Private Sub Disable_Click()
Option Compare Database

Option Explicit

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

To Test
click on your label to activate the password prompt
and type in the wrong password (that will now disable the bypass key) and you will not be able to open the db by holding down the Shift button

to disable enter the correct password and you will be able to use the Shift button

Would someone help?

View 4 Replies View Related

Disable Command Button

May 8, 2007

I have a command button which will work on a specified date of every year. After the user clicks it once (which will carry out calculations), I want this button to be disabled so that it is not available for second click. Is it possible?

View 1 Replies View Related

Enable/Disable Entries

May 9, 2006

Hi there I am new to Access and I am currently modifying an existing DB. Currently this DB has a main table which holds a bunch of Patient info such as:

Name
Age
AssignedStaff
Condition
etc....

The assigned staff field is populated from another table (Staff), which holds all the staff members working at the institution. However a couple of these individuals have left and they no longer want their name to show up on the form when inserting a new record. However we do want there name to still be in the DB for historical reporting purposes......My intital thought was to create another field in the Staff table that would hold either a "Active" or "Inactive" entry. Then just have a simple If statement to see if the staff member is active or inactive. Does anyone see any problems with this solution or propose a more efficient method.

Thanks

View 1 Replies View Related

Insert New Record Disable

Sep 27, 2007

Hiya,

I've inherited an Access 2003 database, a rather complex one. The database has a login, with the credentials stored in a table which I can view (minus the pass, which is masked). Of course, for security reasons, I shouldn't be able to just add a record and create a new ID, in essence bypassing all security. As such, the table with the user records does not permit new records to be added. What steps need I take to add new records, the option being greyed out in the interface, no new record bar available at the bottom of the table.

Any insight is most appreciated.

Slawek

View 1 Replies View Related

Disable A Checkbox After Update

Feb 10, 2005

Hi I have a simple check box that if ticked puts a big red Cancellation text across the record, how do I stop anybody unchecking it on the particular record...probably dead simple, tried loads of combinations but I can't get the right code,thanking you in advance
Dave Williams
Sunny Lanzarote in The Canary Islands

View 7 Replies View Related

How To Disable Navigation Buttons?

Feb 19, 2005

Hello!
I have little problem. I have form which have linked Child table. On that Child table in a form I have displayed Navigation Buttons. I don`t want to see them, but I can`t disable them. I tried everything.

Please, help..... :confused:

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved