I have a button in a form in Access that I am trying to place some VBA code against when someone clicks it. Code I have at the moment is as follows:
PHP Code:
Private Sub Command41_Click()
MsgBox ("this is a test")
End Sub
The button opens up a report in print preview so it has something as an embedded macro already that runs when you click it. Even though I've put the above into visual basic editor, it doesn't pop up when someone clicks the button, so I'm guessing it prioritises the embedded macro over anything that's in Visual Basic?
Any advice on how to solve please? First bit of custom VBA I've done in MS Office so probably a noob mistake.