mlcktmguy
asked on
Repalcement For Find In Newer Versions Of Access
I developed an application in Access 2003 for a client many years ago. I used a 'Find/Binocular' button on the form which had this code behind it.
It is the generic 'Find' with the binoculars showing.
Six months ago the client upgrade to Access 2010 with no changes to the MDB and the command button has continued to work.
I recently updated the MDB on a machine running Access 2010. I didn't make any changes to the form the 'Find' command is on and I left the app as an MDB.
Now the Find/Binocular button doesn't work.
I know that the format of the find is not supported anymore but it worked running in Access 2010 until I made non (Find) related revisions to the app.
Is there a reference I can add to get the find to work? If not, what command replaces the find command I am using in newer versions of Access?
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
It is the generic 'Find' with the binoculars showing.
Six months ago the client upgrade to Access 2010 with no changes to the MDB and the command button has continued to work.
I recently updated the MDB on a machine running Access 2010. I didn't make any changes to the form the 'Find' command is on and I left the app as an MDB.
Now the Find/Binocular button doesn't work.
I know that the format of the find is not supported anymore but it worked running in Access 2010 until I made non (Find) related revisions to the app.
Is there a reference I can add to get the find to work? If not, what command replaces the find command I am using in newer versions of Access?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is the correct command. The issue was being caused because I was opening the form with acDialog specified
Ah. I see. I wouldn't have guessed that this code was inside a modal/dialog instance of the form.
ASKER
Strangely that had been the same and worked perfectly for many years. It was only when I worked on this form in Access 2007 instead of Access 2003 that this problem came up. I even kept the application as an MDB.
I've encountered similar differences in applications run 2007+ versions of Access that worked just fine in 2003.
ASKER
Here is the code in my module:
Open in new window
Then Access is completely locked up. I can't close the form using my user defined 'Exit' button or the 'X' in the upper right hand corner of the form.I can't close Access using the 'X' in the upper right hand corner of Access. I have to use the task manager to cancel Access.
I get no messages but nothing will close.
I also tried building the button using the wizard, which resulted in this code.
Open in new window
Since there is an error handler I get the same message ' The command or action Find isn't available now' in a message box but the application doesn't lock up.
Either way the Find isn't working.