PC Review


Reply
Thread Tools Rate Thread

access97 to 2002 search button conversion error

 
 
Advance Scout
Guest
Posts: n/a
 
      10th Jul 2011
I recently converted an access 97 application to access 2002. My
"customer information form" has a search button that when pressed opened
another form with 3 additional search option buttons on it.

One of those 3 buttons, "search by name", used to open the "find" dialog
box which worked perfectly in Access97 (and still does). But in Access
2002 it is creating an error.

Now when I click that button I get a "Find and Replace" dialog box.
(Access97 was just a "find" dialog box). When data is entered into the
"find what" field and you press the search button you get this error:

"The control "command76" macro is attempting to search cant be searched.
.. Try one of the following....
*add a goto control action before the findrecord action
*for the findrecord action,change the only current field action argument
from yes to no
*change the focus to a searchable control "


The code for the "on click event" for that search button is:

Forms!frmCustomerInvoice.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

and it works on Access97, but apparently not on Access 2002.

I now changed the code to:
Forms!frmCustomerInvoice!.contactLastName.SetFocus
DoCmd.RunCommand acCmdFind

and its working but the new "Find and replace" dialog box is filling in
contactlastname as the "look in:" and once it finds the first match it
wont find any others. If I manually change the "look in:" to the forms
name it will then find any others that match.

So- what code can I try so that it will focus back on the form and not
fill in the "look in" box with the field to search, or fill in the "look
in:" box with the form name? Using just
"Forms!frmCustomerInvoice.SetFocus" does not seem to work in Access2002.
 
Reply With Quote
 
 
 
 
Advance Scout
Guest
Posts: n/a
 
      10th Jul 2011

I just tried this: I went into the tools/options for edit/find and
changed default to general search and that seems to have given me what I
wanted.

But why would the original code for set focus not work in Access2002?




On 7/10/2011 12:01 PM, Advance Scout wrote:
> I recently converted an access 97 application to access 2002. My
> "customer information form" has a search button that when pressed opened
> another form with 3 additional search option buttons on it.
>
> One of those 3 buttons, "search by name", used to open the "find" dialog
> box which worked perfectly in Access97 (and still does). But in Access
> 2002 it is creating an error.
>
> Now when I click that button I get a "Find and Replace" dialog box.
> (Access97 was just a "find" dialog box). When data is entered into the
> "find what" field and you press the search button you get this error:
>
> "The control "command76" macro is attempting to search cant be searched.
> . Try one of the following....
> *add a goto control action before the findrecord action
> *for the findrecord action,change the only current field action argument
> from yes to no
> *change the focus to a searchable control "
>
>
> The code for the "on click event" for that search button is:
>
> Forms!frmCustomerInvoice.SetFocus
> DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
>
> and it works on Access97, but apparently not on Access 2002.
>
> I now changed the code to:
> Forms!frmCustomerInvoice!.contactLastName.SetFocus
> DoCmd.RunCommand acCmdFind
>
> and its working but the new "Find and replace" dialog box is filling in
> contactlastname as the "look in:" and once it finds the first match it
> wont find any others. If I manually change the "look in:" to the forms
> name it will then find any others that match.
>
> So- what code can I try so that it will focus back on the form and not
> fill in the "look in" box with the field to search, or fill in the "look
> in:" box with the form name? Using just
> "Forms!frmCustomerInvoice.SetFocus" does not seem to work in Access2002.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access97 conversion issues Advance Scout Microsoft Access 10 13th May 2011 08:29 PM
Error using SendObject after conversion from Access97 to Access200 =?Utf-8?B?RGF2aWQ=?= Microsoft Access VBA Modules 0 4th Sep 2005 01:17 PM
Conversion Access2 to Access97 =?Utf-8?B?Tlk=?= Microsoft Access 3 29th Nov 2004 04:57 PM
Access97 File Conversion geri Microsoft Access 1 11th Jun 2004 07:22 PM
Macro Button Not working on Conversion from 97 to 2002 Abizar Microsoft Excel Programming 2 8th Oct 2003 11:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:50 PM.