help with Access please (create a filter button)

  • Thread starter Thread starter dragon7
  • Start date Start date
D

dragon7

I have a combo box with different department in i
I have a button in a form called cmdShowDep

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

-the combo box needs to be visibl
-the text caption of the button needs to be 'Show all Depatments' i
Re
-when a combo item is clicked i only want to show those records on th
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top