473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Filter within a filter

TTD
Hy,

is it possible to filter within a filter on a form?

Let's say I have a button which can filter on only open cases and another
button to filter on only my cases, then if I pushed both buttons, I would
get only my open cases.

I thought of doing such so with this code, but VBA was not impressed.

Me.Filter = "tblCases.Ready = False" & "tblCases.Owner = " & LoginUser
Thanks in advance.
Nov 12 '05 #1
2 1454
TTD wrote:
Hy,

is it possible to filter within a filter on a form?

Let's say I have a button which can filter on only open cases and another
button to filter on only my cases, then if I pushed both buttons, I would
get only my open cases.

I thought of doing such so with this code, but VBA was not impressed.

Me.Filter = "tblCases.Ready = False" & "tblCases.Owner = " & LoginUser
Thanks in advance.

You forgot the word AND then you forgot quotes unless your login user is
a number

Me.Filter = "tblCases.Ready = False AND " & _
"tblCases.Owner = """ & LoginUser & """"

or

Me.Filter = "tblCases.Ready = False AND " & _
"tblCases.Owner = '" & LoginUser & "'"

Dates, surround with #. Strings, surround with ' or ". Numbers
surround with nothing.

Nov 12 '05 #2
TTD
Thanks,

it was the right direction...
Me.Filter = "tblCases.Ready = False AND tblCases.Owner = " & LoginUser

was the right formula.

Also thanks for the date tip!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: thijs.kupers | last post by:
Hello, I want to list all the user-tables of a DB2 database. I use the ADO-openSchema method (adSchemaTables), but I can't filter the systables out. Has someone any idea how to select...
2
by: Andante.in.Blue | last post by:
Hi everyone! I was wondering if there is a away to use Access 97's build in filter-by-form function but restrict its effect to just the subform. I have a parent form that shows the major...
5
by: Paul de Goede | last post by:
I set the Response.Filter in my aspnet application but I have noticed that if you do a Server.Transfer that the filter doesn't get called. And in actual fact the response is mostly empty. It seems...
2
by: Josh Naro | last post by:
I am writing a module that requires the entire output from a web app to perform its function. So, basically I need to be able to pull the entire output stream from the Response object. I've tried...
1
by: Cara Murphy | last post by:
Hi There! Hoping you are able to help me with a filtering scenario: I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which...
15
by: Briansmi1116 | last post by:
I created two buttons, that filter my form, They filter in different Fields, and if one is filtered, and the other is not there is a certain amount of record, if they are both pushed, then there is...
1
by: david.katkowski | last post by:
I'm trying to use the __builtin__ filter function within a class; however, I receive the following error: NameError: global name 'MajEthnic' is not defined The line of code is: EthMaj =...
3
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that...
3
by: Gord | last post by:
I'm trying to filter a report with a date in VB code. If I type an actual date bracketed with the pound symbol (i.e. #3-Jul-08#) I can get the filter to work. I can't seem to get it to work by...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.