mans
mans

Reputation: 18168

Open a form with filter in a way that Access asks for filter parameter from user

I want to open a form with a filter but I want access to show a dialog to ask filter parameter from user so I am not going to develop that dialog.

For example, assume that I have a form that attached to an employee database. I want to give the user the capability to open form with employees which their surname is say "smith". But the user should give this "smith" and I don't want to develop a dialog box to ask this from user. Is there any way to do this?

I am using Access 2003 on XP.

Upvotes: 1

Views: 351

Answers (1)

HansUp
HansUp

Reputation: 97101

The simplest approach would be to use a parameter query as the form's record source.

PARAMETERS [Enter Surname] Text ( 255 );
SELECT e.ID, e.surname, e.FirstName
FROM Employees AS e
WHERE e.surname=[Enter Surname];

Upvotes: 2

Related Questions