Article ID: 262094
Article Last Modified on 6/29/2004
APPLIES TO
- Microsoft Office 2000 Developer Edition
- Microsoft Access 2000 Standard Edition
This article was previously published under Q262094
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
For a Microsoft Office XP Developer Edition version of this article, see 306361.
SYMPTOMS
If you programmatically open a form in Filter-by-Form view in a Microsoft Access 2000 run-time application, you may receive the following error message:
CAUSE
The Filter-by-Form commands are not available in a Microsoft Access 2000 run-time application.
RESOLUTION
For additional information about simulating Filter-by-Form in a run-time application, click the article number below to view the article in the Microsoft Knowledge Base:
262099 ACC2000: Filter-by-Form Example for Run-Time Applications Available in the Download Center
MORE INFORMATION
Steps to Reproduce the Behavior
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.
- In the sample database Northwind.mdb, open the Customers form in Design view.
- Add a command button to the form.
- Change the Name property of the command button to btnFilter.
Place the following code in the OnClick event of the command button:
Private Sub btnFilter_Click() DoCmd.RunCommand acCmdFilterByForm End Sub
- Save the form, and then close it.
- On the Tools menu, click Startup.
- Under Display Form, click Customers in the list, and then click OK.
- Click Start, click Run, and then type the following command in the Open box.
NOTE: In the following sample, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when typing this command.
NOTE: If Microsoft Office is not installed in the default location of C:\Program Files\Microsoft Office\Office\, change the following path to where Msaccess.exe is located on your hard disk."C:\Program Files\Microsoft Office\Office\Msaccess.exe" _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" _
/Runtime - When the Customers form opens, click the command button that you created in step 2.
Note that the Filter-by-Form view does not appear and that you receive the error message mentioned in the "Symptoms" section of this article.
Additional query words: prb the application can t continue and will be shut down
Keywords: kberrmsg kbnofix kbpdwizard kbprb KB262094