A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

filtering



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2006, 08:20 PM posted to microsoft.public.access.forms
Jean-Paul
external usenet poster
 
Posts: 74
Default filtering

Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP
  #2  
Old December 29th, 2006, 02:59 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default filtering

Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP

  #3  
Old December 29th, 2006, 01:54 PM posted to microsoft.public.access.forms
Jean-Paul
external usenet poster
 
Posts: 74
Default filtering

I did that in the properties of the form itself... not in the Load-event
I don't think this should make any difference, but it still doesn't work!!
strange
JP

strive4peace schreef:
Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP

  #4  
Old December 29th, 2006, 06:47 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default filtering

Hi Jean-Paul,

if you are filling the property in directly for Filter, do not use quotes

Also, there is no FilterOn property in the property sheet...

a suggestion:
put spaces on either side of your operator
kineitemtrue -- kineitem true

Is kineitem defined to be Yes/No? Is kineitem in the form RecordSet?

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
I did that in the properties of the form itself... not in the Load-event
I don't think this should make any difference, but it still doesn't work!!
strange
JP

strive4peace schreef:
Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP

  #5  
Old December 30th, 2006, 09:17 AM posted to microsoft.public.access.forms
Jean-Paul
external usenet poster
 
Posts: 74
Default filtering

Hey....
I wrote:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Me.filteron = True
endif
End Sub

with perfect result...
But when I canhed it all into:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Else
Me.Filter = "Patienten.[kineitem] = false AND Patienten.[Nu nog
leerling] = 'J' "
End If
End Sub

I get an errormessage 2001 (no help available) saying (and now I have to
translet so the syntax may be different)
"You dismissed previous action"

What do I do wrong this time?
Also I doubt if the syntax
"Patienten.[kineitem] = false AND Patienten.[Nu nog leerling] = 'J' "
will work because of the quotes ('J' ")

Thanks fo your kind help and best wishes for 2007
JP Belgium

strive4peace schreef:
Hi Jean-Paul,

if you are filling the property in directly for Filter, do not use quotes

Also, there is no FilterOn property in the property sheet...

a suggestion:
put spaces on either side of your operator
kineitemtrue -- kineitem true

Is kineitem defined to be Yes/No? Is kineitem in the form RecordSet?

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
I did that in the properties of the form itself... not in the Load-event
I don't think this should make any difference, but it still doesn't
work!!
strange
JP

strive4peace schreef:
Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP

  #6  
Old December 30th, 2006, 01:13 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default filtering

That very misleading error message can occur if you've mistyped the name of
a field or table.

Since the only difference between the working and non-working code appears
to be the addition of the field [Nu nog leerling], make sure that name is
typed correctly.

The single quotes around J should be no problem.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Jean-Paul" wrote in message
...
Hey....
I wrote:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Me.filteron = True
endif
End Sub

with perfect result...
But when I canhed it all into:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Else
Me.Filter = "Patienten.[kineitem] = false AND Patienten.[Nu nog
leerling] = 'J' "
End If
End Sub

I get an errormessage 2001 (no help available) saying (and now I have to
translet so the syntax may be different)
"You dismissed previous action"

What do I do wrong this time?
Also I doubt if the syntax
"Patienten.[kineitem] = false AND Patienten.[Nu nog leerling] = 'J' "
will work because of the quotes ('J' ")

Thanks fo your kind help and best wishes for 2007
JP Belgium

strive4peace schreef:
Hi Jean-Paul,

if you are filling the property in directly for Filter, do not use quotes

Also, there is no FilterOn property in the property sheet...

a suggestion:
put spaces on either side of your operator
kineitemtrue -- kineitem true

Is kineitem defined to be Yes/No? Is kineitem in the form RecordSet?

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
I did that in the properties of the form itself... not in the Load-event
I don't think this should make any difference, but it still doesn't
work!!
strange
JP

strive4peace schreef:
Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those with
"kineitems = true"

What can cause this?

Thanks
JP



  #7  
Old December 30th, 2006, 05:19 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default filtering

Hi Jean-Paul,

not sure if it makes a difference because I never switch them... but I
always put Me.FilterOn = True AFTER I set the filter...

"Patienten.[kineitem] = false AND Patienten.[Nu nog leerling] = 'J'"
should be ok -- I removed the space after the last single quote '

if kineitem is not in the form RecordSource twice, you should not need
to preface it with the tablename... same with [Nu nog leerling] ... so
you should be able to do this too:

"[kineitem] = false AND [Nu nog leerling] = 'J'"

It is a bad idea to use spaces in names. For the future, I recommend
you not do it.

to help you understand Access a bit better, send me an email and request
my 30-page Word document on Access Basics (for Programming) -- it
doesn't cover VBA, but prepares you for it because it covers essentials
in Access.

Be sure to put "Access Basics" in the subject line so that I see your
message...


Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hey....
I wrote:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Me.filteron = True
endif
End Sub

with perfect result...
But when I canhed it all into:

Private Sub Form_Load()
Me.FilterOn = True
If ALleofNu = "N" Then
Me.Filter = "Patienten.[kineitem] = false"
Else
Me.Filter = "Patienten.[kineitem] = false AND Patienten.[Nu nog
leerling] = 'J' "
End If
End Sub

I get an errormessage 2001 (no help available) saying (and now I have to
translet so the syntax may be different)
"You dismissed previous action"

What do I do wrong this time?
Also I doubt if the syntax
"Patienten.[kineitem] = false AND Patienten.[Nu nog leerling] = 'J' "
will work because of the quotes ('J' ")

Thanks fo your kind help and best wishes for 2007
JP Belgium

strive4peace schreef:
Hi Jean-Paul,

if you are filling the property in directly for Filter, do not use quotes

Also, there is no FilterOn property in the property sheet...

a suggestion:
put spaces on either side of your operator
kineitemtrue -- kineitem true

Is kineitem defined to be Yes/No? Is kineitem in the form RecordSet?

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
I did that in the properties of the form itself... not in the Load-event
I don't think this should make any difference, but it still doesn't
work!!
strange
JP

strive4peace schreef:
Hi Jean-Paul,

in addition to *Filter* forms also have a *FilterOn* property

you can do this on the form Load event...

'~~~~~~~~~~~~~~~~~
me.Filter = "kineitem true"
me.FilterOn = true
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Jean-Paul wrote:
Hi,
My form is based upon a table (of course...)
In the properties I set "kineitemtrue" as filter
filter is set to true

When I "walk" through my records, I see all records, even those
with "kineitems = true"

What can cause this?

Thanks
JP

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.