I knew it had to be simple. I have spent many hours on this. Dahhhhh!
and "DelDate Is Not Null" works too.
Thank you John
Ilona
  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of John Viescas
  Sent: Monday, 5 June 2006 2:56 PM
  To: [email protected]
  Subject: RE: [ms_access] Filters help please..sorted


  Ilona-

  Love it when posters solve their own problems.  Your first one should
  probably be:

    DoCmd.OpenReport stDocName, acViewPreview, "",
    "DelDate Is Null"

  John Viescas, author
  Building Microsoft Access Applications
  Microsoft Office Access 2003 Inside Out
  Running Microsoft Access 2000
  SQL Queries for Mere Mortals
  http://www.viescas.com/
  (Paris, France)
  For the inside scoop on Access 2007, see:
  http://blogs.msdn.com/access/


  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf
  Of Ilona Wright
  Sent: Monday, June 05, 2006 7:01 AM
  To: [email protected]
  Subject: RE: [ms_access] Filters help please..sorted

  Hi John,
  I had an incorrect variable name in the Where Condition. Should have been
  DelDate. Interesting that Access did not pick it up.
  Sorry if I have put you to any trouble.
  Ilona

    -----Original Message-----
    From: [email protected] [mailto:[EMAIL PROTECTED]
  Behalf Of Ilona Wright
    Sent: Monday, 5 June 2006 2:00 PM
    To: [email protected]
    Subject: RE: [ms_access] Filters help please


    Hi John,

    I need more help please.

    Sorry this is so long.

    I am having a lot of trouble getting my head around filters, etc.

    I want a report that prints out assets that are  active, deleted or all
    "Computers"  for a nominated centre or all centres.

    I have a form in which there is a combo box from which the user can
select
  a
    centre. I also add "(All)" to the top of the list of centres, so
  effectively
    the user can select all centres or an individual centre.

    I also have an option group of check boxes called "optPrtOptions"
  (recognise
    that?!!) from which the user can select to print

    1 … active computers (ie deleted date IsNull)

    2 … deleted computers (ie deleted date Is Not Null)

    3 … all computers (no check on deleted date required)

    I know there must be a better way, but I am going with what I can get
    working.

    The report was written first and uses a query called
"qryComputerRegister"
    It also has 2 subreports in it. I had a lot of problems getting
    qryComputerRegister to select "Computers" for a given centre or all
  centres
    so I wrote separate queries for selecting all computers off the assets
  table
    and then using the resultant query to select computers for a given
centre
  or
    all centres.

    I then replace "qryComputerRegister" with my resultant qry.

    I now can successfully get all the computers for a given centre or all
    centres.

    But, now I want to incorporate the optPrtOptions and I thought I would
be
    able to do this using the WhereCondition as shown below.



    Select Case Me!optPrtOptions

    Case 1

    DoCmd.OpenReport stDocName, acViewPreview, "",
    "IsNull([qryComputerRegister]![DeletedDate])"

    Case 2

    DoCmd.OpenReport stDocName, acViewPreview, "",
    "([qryComputerRegister]![DeletedDate])>0"

    Case 3

    DoCmd.OpenReport stDocName, acViewPreview

    End Select

    Case 1 gives me everything, including records where the deleted date Is
  Not
    Null.

    Case 2 gives me nothing, I suspect my _expression_ is wrong.

    Case 3 gives me all computers which is correct

    Can you please lead me in the right direction so that I can get this
    working?

    Thank you in anticipation

    Ilona

    Adelaide, Australia






    [Non-text portions of this message have been removed]



    SPONSORED LINKS Microsoft access database  Database development software
  Database management software
          Database software  Inventory database software  Membership
database
  software


  --------------------------------------------------------------------------
--
  --
    YAHOO! GROUPS LINKS

      a..  Visit your group "ms_access" on the web.

      b..  To unsubscribe from this group, send an email to:
       [EMAIL PROTECTED]

      c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
  Service.


  --------------------------------------------------------------------------
--
  --



  [Non-text portions of this message have been removed]





  Yahoo! Groups Links










  SPONSORED LINKS Microsoft access database  Database development software
Database management software
        Database software  Inventory database software  Membership database
software


----------------------------------------------------------------------------
--
  YAHOO! GROUPS LINKS

    a..  Visit your group "ms_access" on the web.

    b..  To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.


----------------------------------------------------------------------------
--



[Non-text portions of this message have been removed]



SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to