Results 1 to 9 of 9
  1. #1
    falahsalih is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    38

    Enabling ctrl + f in Microsoft access 2007 after it has been disabled

    I have disabled the ctrl + f (find and replace) from access form of my database. Now i want to re-enable it again but I can't. I used the following code as a disable procedure

    .

    ' Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    ' If KeyCode = vbKeyA And Shift = acCtrlMask Then
    ' 'Catch Ctrl+A
    ' KeyCode = 0 'Suppress keypress
    ' End If
    ' End Sub
    Can any help please ? many thanks
    Last edited by falahsalih; 05-03-2014 at 02:23 PM.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Comment out the code ?????

    Code:
    'Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    ' If KeyCode = vbKeyA And Shift = acCtrlMask Then 'Catch Ctrl+A
    '  KeyCode = 0 'Suppress 
    '  keypress
    ' End If
    'End Sub

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What is attempted code to enable?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    falahsalih is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    38
    Sorry ?? I didn't understand what you mean

  5. #5
    falahsalih is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    38
    Well, after I have wrote the code, i delete it, so that the ctrl + f "find " should be enabled !!!
    But, it is not. i.e. the ctrl + f still can't show me the find window even when I deleted the code
    Actually, it shows me a message "Command or action 'Find' isn't available now access 2007"

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Try building a new form that is bound to a table and add some bound controls. Open in form view and set focus inside one of the bound controls that displays data from the table/query. Use Ctrl+f and see if you get the error.

    Ctrl+f will only work when focus is inside a bound control and there is a dataset available to search. Otherwise, you can expect a message, "The search function is not available now" or something close to that....

  7. #7
    falahsalih is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    38
    Quote Originally Posted by ItsMe View Post
    Try building a new form that is bound to a table and add some bound controls. Open in form view and set focus inside one of the bound controls that displays data from the table/query. Use Ctrl+f and see if you get the error.

    Ctrl+f will only work when focus is inside a bound control and there is a dataset available to search. Otherwise, you can expect a message, "The search function is not available now" or something close to that....
    ItsMe,
    the form consists of records, and the focus is inside the first record wich is refers to customer ID, please read my reply to June7, so you will understand better what a problem I 'm Having

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I tried this code and it does not run. ctrl+f is not disabled.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    falahsalih is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    38
    Quote Originally Posted by June7 View Post
    I tried this code and it does not run. ctrl+f is not disabled.
    yes, you are right, it disables ctrl + A
    I should replace A by F
    anyway, problem solved
    thank you guys

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pivot in Access 2007 disabled
    By Gopinath.m.v in forum Access
    Replies: 1
    Last Post: 10-07-2013, 10:11 AM
  2. Replies: 2
    Last Post: 03-19-2012, 05:08 AM
  3. Replies: 7
    Last Post: 11-20-2011, 08:34 PM
  4. Replies: 1
    Last Post: 08-02-2011, 06:49 AM
  5. Replies: 2
    Last Post: 07-29-2011, 11:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums