Marshall Barton wrote:
[Quoted Text] > mugziegumz via AccessMonster.com wrote: > >> One more question... >> Here are examples of invoices: >> 11595550 >> 145390 >> 18375 >> 2101931 >> 212864 >> 5g8509 >> 5g8886 >> All invoice are sporadic. If I wanted to create a query and save it >> to go into whenever and do a search for all invoices with a 1, or >> all invoices that start with G...how do I create a query where it is >> simple to open it, type in what I'm looking for and get the details. >> Or do I have to go in to the query each time, click design button >> and change my search to whatever I'm looking for? > > > A quick and dirty way is to set the criteia to: > Like [Enter first character] & "*" > > A better way would be to create a form with a text box where > you can enter the first character and a button to open the > query (the button wizard can create the code for you). In > this case the criteria would be: > Like Forms![form name].[text box name] & "*" > > An even better way is avoid displaying a query (where users, > including yourself, can easily mutilate the data) by using a > continuous form to display the records. In this scenario, > the text box would be in the form's header section and the > criteria could be either as in the second scenario. Since > this does not use a button, you woll need a line of code in > the text box's AfterUpdate event procedure: > Me.Requery
This does not answer the question you asked but a combo box sorted on teh invoice number would allow this.
|