Can you show us the code in the Click event of the button please? Thanks.When I click the button manually, it works. It opens another form. When I use Command5_Click I get an error.
Ah, that's an embedded macro. Not sure you can execute it another way aside from clicking on the button. If you must use macros, you might use a named macro instead. Otherwise, you could repeat/duplicate the macro in your other code. Just a thought...Here is what's in the command button.
View attachment 98482
Hi. Glad to hear you got it sorted out. Good luck with your project.Yes, that did it. Thanks!
Why?Not considered good practice.
It's better it you put the command button code in its own routine and call that from the command button and elsewhere....
But I was referring to its content (the code inside the macro). Even if you convert it into VBA, do you really think it should be in a Standard Module. I was just curious...Ha! Its a macro!
It should immediately be converted into VBA and the perpetrator of the offence should be banned from (AWF) Access World Forums!
Well, it is almost a year on but reading it again it seems to me my comments and yours weren't the sameYes, as I said....
That's still my opinionHowever, in this case where the button click code is simple and used in just one other place, I see no reason to create a separate procedure just for the sake of it.
If the button doesn't wobble properly and visibly, it's incomplete.I often call a button click event from one other event in the same form.