Simple Search Form

  • Thread starter Thread starter Russ
  • Start date Start date
R

Russ

Any ideas on a simple search form? I want to enter a value
into a control on a form at the top of the form which is
bound to a query, and have hidden controls for the other
fields related to any record found below it. If the value
is in the query, display it and related record data by
unhiding the controls. If it's not, display a message
informing the user that the value the search was based on
was not found.

Thanks,
 
Russ,

Possibly simpler than hiding and unhiding the controls on the form,
would be to set the AllowAdditions property of the form to No, and
simply refer to the unbound textbox in the criteria of the query,
using syntax such as...
[Forms]![NameOfFrom]![NameOfUnboundControl]
.... or use wildcards as applicable if you want the search to only
relate to part of the field. Then, on the AfterUpdate event of the
unbound textbox, put this code...
Me.Requery

- Steve Schapel, Microsoft Access MVP
 
Back
Top