Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

help with Access please (create a filter button)

Discussion in 'Information Technology' started by dragon7, Nov 8, 2005.

  1. dragon7

    dragon7
    Expand Collapse
    Guest

    I have a combo box with different department in it
    I have a button in a form called cmdShowDept

    -When i open the form i have the combo box is set to not visible
    -When the Show only one Dept(cmdShowDept) button is clicked i want the
    following to happen

    -the combo box needs to be visible
    -the text caption of the button needs to be 'Show all Depatments' in
    Red
    -when a combo item is clicked i only want to show those records on the
    form.
    -when the button is pressed with the red text 'Show all Departments',
    it needs to change back to the black text 'Show only one Department',
    and the combo box needs to disappear.

    any help with this would be good.
    thanx :shock:
     
  2. Loading...


  3. [MVP] S.Clark

    [MVP] S.Clark
    Expand Collapse
    Guest

    Man... what professors don't make their students do these days... :D

    in the cmdShowDept on click, make the cbo visible with

    cboDept.Visible = True

    And modify the caption of the Show Dept button

    with cmdShowDept
    if .caption = "This" then
    .caption = "That"
    else
    .caption = "This"
    end if
    end with

    Reverse the process for when the other conditions apply.

    --
    Steve Clark, Access MVP
    http://www.fmsinc.com/consulting

    "dragon7" <jedi300@dodo.com-dot-au.no-spam.invalid> wrote in message
    news:zeudnTZJ-dAw7u3eRVn_vQ@giganews.com...
    >I have a combo box with different department in it
    > I have a button in a form called cmdShowDept
    >
    > -When i open the form i have the combo box is set to not visible
    > -When the Show only one Dept(cmdShowDept) button is clicked i want the
    > following to happen
    >
    > -the combo box needs to be visible
    > -the text caption of the button needs to be 'Show all Depatments' in
    > Red
    > -when a combo item is clicked i only want to show those records on the
    > form.
    > -when the button is pressed with the red text 'Show all Departments',
    > it needs to change back to the black text 'Show only one Department',
    > and the combo box needs to disappear.
    >
    > any help with this would be good.
    > thanx :shock:
    >
     

Share This Page