docmd.applyfilter

  • Thread starter Thread starter Switchboard
  • Start date Start date
S

Switchboard

I want to use this command to select in a form 2 criteria but i do not know
if this is possible or how the code works.

If wan to select one criteria it is easy. I works like DoCmd.ApplyFilter ,
"(status_probleem = 'open') "

Also now i selected all the info where [status_problem] is open but i want
to give 2 criteria . Also , in my database, if it is structural or incidental

also something like DoCmd.ApplyFilter , "(status_probleem = 'open') &
(structureel_incidenteel = 'Incidenteel')"

But this does not work. Does any know what the code should be ?

Greetings,

Timo/netherlands
 
I want to use this command to select in a form 2 criteria but i do not know
if this is possible or how the code works.

If wan to select one criteria it is easy. I works like DoCmd.ApplyFilter ,
"(status_probleem = 'open') "

Also now i selected all the info where [status_problem] is open but i want
to give 2 criteria . Also , in my database, if it is structural or incidental

also something like DoCmd.ApplyFilter , "(status_probleem = 'open') &
(structureel_incidenteel = 'Incidenteel')"

But this does not work. Does any know what the code should be ?

Greetings,

Timo/netherlands

In the code you would use:

Me.Filter = "[Status_Problem] = 'Open' and [OtherControl] =
'something'"
Me.FilterOn = True

The above assumes both criteria fields are Text datatypes.
 
Hello Fredg,

Thanks,
this was very helpful !

fredg said:
I want to use this command to select in a form 2 criteria but i do not know
if this is possible or how the code works.

If wan to select one criteria it is easy. I works like DoCmd.ApplyFilter ,
"(status_probleem = 'open') "

Also now i selected all the info where [status_problem] is open but i want
to give 2 criteria . Also , in my database, if it is structural or incidental

also something like DoCmd.ApplyFilter , "(status_probleem = 'open') &
(structureel_incidenteel = 'Incidenteel')"

But this does not work. Does any know what the code should be ?

Greetings,

Timo/netherlands

In the code you would use:

Me.Filter = "[Status_Problem] = 'Open' and [OtherControl] =
'something'"
Me.FilterOn = True

The above assumes both criteria fields are Text datatypes.
 
Back
Top