Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    paris, FRANCE

    Question Unanswered: clarification on the use of forms


    I want to create a dropdown list to filter my results shown on a form. Sort of like a selection filter but for the dates (select offers earlier than... or from the past week,from the past 2 weeks...), or type of activity (identified with an acronym) ... Anyways the problem is the same for all of these dropdown lists which act as a filter on the data shown...

    I am not confident on which angle I should see the problem...
    Could someone attach a simple exemple of a filtering form like the one I am trying to do? I know there must be thousands of example, given the easy level of my question!!!

    Thanks for your help to you all!!!


  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    no example, but the general route is:

    you make a combo with the wizard switched on - type in the values that i want.
    two columns:
    1,2,3,4,5 etc (this is the hidden bound column)
    this week, last week, this month, last month etc.

    you need a couple of textboxes: earliest, latest

    you need combo_afterupdate
    select case combo.value
    case 1 'this week
    earliest.value = some maths
    latest.value = some maths
    case 2
    case 3'etc
    end select

    "some maths" uses built in functions like dateadd(), day(), week() month() etc on date() to get the right dates in place

    you need a query that looks at the textboxes earliest, latest and has criteria:
    = between earliest and latest

    your form uses this query as recordsource

    finally, when it all works, you .visible = no the two textboxes


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts