Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution    Let's do it!

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:
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page