Microsoft KB Archive/62237

Works: Removing Multiple Queries with a Looping Macro

PSS ID Number: Q62237 Article last modified on 06-12-1996

2.00

MS-DOS

= SUMMARY =

Queries in the Works database may fail to find any matches that are truly in the database or always find and return one record regardless of the query used. This is most often the result of a corrupt file or record entry, but it can be the result of multiple stored queries.

= MORE INFORMATION =

To determine if the program is storing multiple queries, move to the query screen, press CTRL+END and note the number on the far left-hand side of the status bar. If the number is greater than 2, multiple queries have been stored (numbers in the range of 200-500 are not uncommon depending on how often queries are used).

If many queries have been stored, the fastest way to clear them is to create a looping macro.


 * 1) Switch Works to text mode (the macro will operate faster in this mode) and move to the query screen.
 * 2) Press ALT+/ and choose record macro.
 * 3) Define a key sequence for the macro (for example, CTRL+D).
 * 4) Press ALT+E (for the Edit menu), press L (for Delete).
 * 5) Press CTRL+D (Works should notify you that the macro is a looping macro).
 * 6) While in the query screen, press CTRL+HOME to ensure that the number in the left hand side of the status bar is 1. This is important; if the number in the status bar is not 1, the macro will not work.
 * 7) Start the macro. When you think that all the stored queries are deleted, press ALT+/ to stop the macro. The number in the left hand side of the status bar will still be 1. Press CTRL+END. If the number now showing is greater than 2, some queries still need to be deleted. When all queries are deleted, the number that appears when CTRL+END is pressed will be 2.

KBCategory: kbother KBSubcategory: dworkskb Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1996.