Re: If criteria is null return all

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Here is the structure of my data.

maintracker:
[AssociateID] = the user id (this is tracked by there sign in name which is
a 6 digit user id)
[date] = the date they took the call
[UserID] = ID of the person contacting the associate
[ProfitCenter] = Where the user is located > selection is linked to table
[Policy Number] = ID of the customer's policy
[Call Type] = Subject type of call > selection is linked to table
[Action Taken on Call] = Basic action our associate did > selection is
linked to table
[Reason for Disconnect] = In certain cases they will fill this out if they
were required to remove a particualr option > selection is linked to table
[Problem Description] = A list of major problems encountered by custmer's >
selection is linked to table
[Comments] = Allows our user to put in comments for later follow ups or
questions.


I hope this helps with the below also. I attempted to use the below but
both options did not work for what I needed.

First option doesn't work since it doesn't allow for me to filter out
unwanted data. (e.g. if I put in a user and a date it will show me all the
users for the date instead of just one)

Second option doesn't work since it filters out null data.


Please look over the above and let me know if the above is a flawed structure.

"Rick B" wrote:

Just enter your criteria Like [forms]![search]![name] & "*" under each
field you want to check. Put each piece of criteria on a separate row in
the query grid to create an "OR" condition, or on the same line to create an
"AND" condition.

What ten fields are you searching? Are they all name fields? If so, you
have a flawed data structure and you will run into lots of headaches unless
you fix the data structure. If the name may appear in one of several
fields, then you have a one-to-many relationship that should be handled with
a separate related table.

Post back with some details if you need help with the structure of your
table.

--
Rick B



"Krizhek" <Krizhek@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9B339B86-1408-4C27-88BB-BB24608E5CB1@xxxxxxxxxxxxxxxx
If criteria is null return all
That all I want to do but after trying several ways I can't get any to
work.
Here is what I have tried so far for the criteria

Like [forms]![search]![name] & "*"
<>Which doesn't work since I have 10 fields I want to search and using
this causes null values in some fields to filter out.
Like "*" & [forms]![search]![name] & "*"
<>Same as above
[forms]![search]![name] and ([forms]![Search]![name] is null)
<> this causes the query to response with insufficient memory error

Below is the SQL of my query so you can see how many fields I am dealing
with.

SELECT UpdatedTable.[Who are you?], UpdatedTable.Date, UpdatedTable.[User
ID], UpdatedTable.[Profit Center], UpdatedTable.[Policy Number],
UpdatedTable.[Call Type], UpdatedTable.[Action Taken on Call],
UpdatedTable.[Reason for Disconnect], UpdatedTable.[Problem Description]
FROM UpdatedTable;




.



Relevant Pages

  • Re: mysterious disappearing filter
    ... I think the beastly query as transformed by the query "genie" is too long to ... serve as a filter. ... If I try to paste the query in the Filter line in the ... I suppose I need to come up with a new way of searching. ...
    (microsoft.public.access.formscoding)
  • Re: Multiple filters using combo box
    ... Here's another sample database for this, ... and textboxes to do the searching. ... This sample shows you how to do all the code to filter the query and get ...
    (microsoft.public.access.forms)
  • Re: Ping Nick Hodges
    ... Typing something like "query", that kind of filter shows me every ... searching for a *TSQLQuery", ...
    (borland.public.delphi.non-technical)
  • Re: Multiple filters using combo box
    ... I suggest you download a sample database that uses a form built with combos ... and textboxes to do the searching. ... This sample shows you how to do all the code to filter the query and get ...
    (microsoft.public.access.forms)
  • Please Help: Cannot UPDATE a table based on a query
    ... the above would be an UPDATE query not *code* as you indicated ... "Gina Whipp" wrote: ... then filter the records to get even more specific records. ...
    (microsoft.public.access.formscoding)