Simple Search Form

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,
 
S

Steve Schapel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top