Results 1 to 2 of 2

Query criteria in a form

  1. #1
    sefiroths is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    4

    Query criteria in a form

    I have a query that shows for example "name,address,birth_date"
    i have a form "_pec_tot" with field editbox with:
    "from","to","start query"

    if editbox are empty i want to not filtrate the result,
    if only "from" is not null i have to choose the rows that has the birthdate>=than the field ecc...
    if i only use:
    Between [Forms]![_PEC_TOT]![from] And [Forms]![_PEC_TOT]![to]
    and the field are both with value i have no problem

    i have trouble if editbox are empty so i have tried:

    in the query, under birthdate criteria i have written
    Switch(Not IsNull([Forms]![_PEC_TOT]![from]) And Not IsNull([Forms]![_PEC_TOT]![to]);Between [Forms]![_PEC_TOT]![from] And [Forms]![_PEC_TOT]![to];Not IsNull([Forms]![_PEC_TOT]![from]);>[Forms]![_PEC_TOT]![from];Not IsNull([Forms]![_PEC_TOT]![to]);<[Forms]![_PEC_TOT]![to])

    no error appears, but found nothing, even all editbox have value...
    what can i do?


    thanks

  2. #2
    sefiroths is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    4
    is there no way to do it?
    can't i do any dinamic query?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query Criteria
    By Texaine in forum Queries
    Replies: 1
    Last Post: 01-24-2018, 02:36 PM
  2. Replies: 3
    Last Post: 06-03-2009, 07:15 AM
  3. Query Criteria
    By MrMitch in forum Queries
    Replies: 0
    Last Post: 03-31-2009, 02:25 PM
  4. Query Criteria
    By jena in forum Access
    Replies: 1
    Last Post: 08-03-2008, 04:08 AM
  5. Replies: 0
    Last Post: 02-09-2007, 09:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums