Results 1 to 2 of 2

Thread: Filter

  1. #1
    Join Date
    Feb 2013
    Posts
    14

    Unanswered: Filter

    Hi

    I have a form which lists employees and departments, etc... this is linked to a query: qryEmployeeRecord

    In the footer of the form I have placed a combo box named cbodepartment.

    I have built a link in qryEmployeeRecord under department to the cbodepartment in my form.

    This allows me to apply a filter by department and works well.

    However, what I miss is the ability to 'list all'. How could I achieve this in this example?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have another button in the footer which enables or disables the filter. you can use a toggle style
    Code:
     if mytogglebutton.caption = 'Enable &Filter' then 'we need to use the value from the combo
      me.filter = ..... 'whatever your code is for the filter
      me.filteron=true
      mytogglebutton.caption = 'Disable &Filter'
    else 'we need to disable the filter
      me.filteron = false
      me.requery
      mytogglebutton.caption = 'Enable &Filter'
    endif

    or
    populate the combo box yourself and add 'all' to the options. you may also need to intercept the on click to decide how to handle the 'all' option
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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