Filter with prompt not working

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

I have a filter that partially works. I want to ask the user (prompt) to
enter a project name, but want the code to work so they don't have to enter
the entire project name. Like Cit for Citrix.

Here is the query code for now.
DoCmd.ApplyFilter , "[Group_Name] = [Enter Project Name] and [Status] =
'Open'"

Thanks
 
Ben said:
I have a filter that partially works. I want to ask the user (prompt) to
enter a project name, but want the code to work so they don't have to enter
the entire project name. Like Cit for Citrix.

Here is the query code for now.
DoCmd.ApplyFilter , "[Group_Name] = [Enter Project Name] and [Status] =
'Open'"


Use the Like operator with a wildcard instead of =

... "[Group_Name] Like [Enter Project Name] & "*" And
[Status] = 'Open'"
 
Marshall,
I got a Type Mismatch Error. What could be the problem?

Marshall Barton said:
Ben said:
I have a filter that partially works. I want to ask the user (prompt) to
enter a project name, but want the code to work so they don't have to enter
the entire project name. Like Cit for Citrix.

Here is the query code for now.
DoCmd.ApplyFilter , "[Group_Name] = [Enter Project Name] and [Status] =
'Open'"


Use the Like operator with a wildcard instead of =

... "[Group_Name] Like [Enter Project Name] & "*" And
[Status] = 'Open'"
 
Lots and lots of things could be a problem. How about
removing first one, then the other condition to see which
one causes the error.

Beyond that, please explain each of the two field's data
type (not format) and include a copy/paste of your code as
it is when the error appears along with the stuff you
entered in the parameter prompt box.
--
Marsh
MVP [MS Access]

I got a Type Mismatch Error. What could be the problem?

Marshall Barton said:
Ben said:
I have a filter that partially works. I want to ask the user (prompt) to
enter a project name, but want the code to work so they don't have to enter
the entire project name. Like Cit for Citrix.

Here is the query code for now.
DoCmd.ApplyFilter , "[Group_Name] = [Enter Project Name] and [Status] =
'Open'"


Use the Like operator with a wildcard instead of =

... "[Group_Name] Like [Enter Project Name] & "*" And
[Status] = 'Open'"
 
Back
Top