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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|