Search box in form

  • Thread starter Thread starter Ann
  • Start date Start date
A

Ann

Based on information from this website(thanks to all who
volunteer) I found instructions on creating a search box
on a form but I need a variation of that and my VB skills
are limited. Hoping someone can help.
I have part number, account and date fields on a form and
the request is for a button that when clicked will display
the 20 most recent part numbers entered for the account
and the date they were created on. The information is
required because the part number name is based on an
algorithm that is too complicated/varied to automate but
having previous info helps in determining the next name.
(The paper form we are migrating from displayed the info
handily.)
 
Ann, I am not sure what exactly you are trying to do, but
give this a try and see what happens:
1. Make a query that contains the P/N, Account, & Date.
2. At top of query in design mode, enter 20 into
the "Top Values" window. This will limit the query to
display no more than 20 records.
3. Give this query an [Account] parameter in the
criteria row of the Account column.
4. Give this query a [Date] parameter in the criteria
row of the Date column.
5. Set the Date column for "Sort Descending."
This should show 20 most recent part numbers for the
Account and the Date you enter as parameters.
You can launch this query from a report or a button.

Denny G.
 
Back
Top