Does anyone know how to click a button in a form using a macro, i want the macro to run the filter button I've set up but cant find the section in the macro that would allow me to do this?
Printable View
Does anyone know how to click a button in a form using a macro, i want the macro to run the filter button I've set up but cant find the section in the macro that would allow me to do this?
Take the code in the button's click event and make it into a Sub routine and have the macro run the Sub.
when viewing the form in edit mode, double click on the command button. you should get where you can insert code. the subroutine should be title as such.
if you don't see the click then you did it wrong.Code:Private Sub CommandButton1_Click()
if you are then trying to use another button in the same form to run the click event, then just type it out as
Code:Call CommandButton1_Click()
thats brilliant thanks again for your help guys, thumbs up to your eclectic knowledge on a database front!