PC Review


Reply
Thread Tools Rate Thread

docmd.applyfilter

 
 
Switchboard
Guest
Posts: n/a
 
      22nd Mar 2009
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


 
Reply With Quote
 
 
 
 
fredg
Guest
Posts: n/a
 
      22nd Mar 2009
On Sun, 22 Mar 2009 09:31:03 -0700, Switchboard wrote:

> 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.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
Switchboard
Guest
Posts: n/a
 
      23rd Mar 2009
Hello Fredg,

Thanks,
this was very helpful !

"fredg" wrote:

> On Sun, 22 Mar 2009 09:31:03 -0700, Switchboard wrote:
>
> > 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.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DoCmd.ApplyFilter problem Dorian Microsoft Access Form Coding 2 15th Dec 2009 08:42 PM
Docmd.Applyfilter Dorian Microsoft Access Form Coding 1 15th Dec 2009 04:42 AM
Docmd applyfilter =?Utf-8?B?S2FyZW5I?= Microsoft Access Form Coding 0 2nd May 2007 03:46 PM
DoCmd.ShowAllRecords AND DoCmd.ApplyFilter issues =?Utf-8?B?VGVk?= Microsoft Access VBA Modules 8 14th Sep 2005 04:04 PM
Bug in DoCmd.ApplyFilter? Neil Microsoft Access VBA Modules 4 10th Oct 2003 07:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:51 PM.