D
DavidBoyle via AccessMonster.com
My colleagues and I have a problem that occurs while designing access forms
and it isn't helped by the fact that our applications have a lot of buttons
on their forms.
The best way I can describe the problem is to explain how to repeat the
problematic behavior.
1) Create a blank form and stick a button on it and connect it to some code
say:
Private Sub Command6_Click()
MsgBox ("Hello World")
End Sub
2) Change the form to design view.
Right Click the button then do edit cut, edit paste from the main menu.
Right click the form title bar and choose form view.
Click the button in no longer works.
Go back to design view, right click the button and build event, you'll find
the cursor flashing away happily in the click event. Close the visual basic
editor put the form back in form view and the button works happily again.
Obviously I'd like to be able to cut and paste buttons without breaking their
events, but can anyone explain why the link to the code gets broken? It this
behaviour by design?
and it isn't helped by the fact that our applications have a lot of buttons
on their forms.
The best way I can describe the problem is to explain how to repeat the
problematic behavior.
1) Create a blank form and stick a button on it and connect it to some code
say:
Private Sub Command6_Click()
MsgBox ("Hello World")
End Sub
2) Change the form to design view.
Right Click the button then do edit cut, edit paste from the main menu.
Right click the form title bar and choose form view.
Click the button in no longer works.
Go back to design view, right click the button and build event, you'll find
the cursor flashing away happily in the click event. Close the visual basic
editor put the form back in form view and the button works happily again.
Obviously I'd like to be able to cut and paste buttons without breaking their
events, but can anyone explain why the link to the code gets broken? It this
behaviour by design?