Newby help! Creating user-input defined search queries...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

New to access and trying hard to work out how to create an input field on a form which would allow the user to Input a name, then click a search button to run a query based on the input.

A simple example of which -

User inputs 'staff name' - hits search button - this then runs a query to bring back all assorted records associated with that member of staff.

Can make the form, add in the button to run a macro or event, can make a query to run search - can't work out how to get the input of the field to add it into the query automatically.

I know it's probably hugely easy but I'm new to this software. Can anyone educate me

Thanks
 
Ed,

In the criteria of the staff field in the query, put the equivalent of...
[Forms]![NameOfYourSearchForm]![NameOfCriteriaTextbox]
 
It does indeed work

Now I've got hours of creating forms for my tables to create simple queries ahead.. Still very happy

Many thanks.

There may be more questions on the way..
 
Back
Top