>I am using the Form builder wizard to make a data screen of a single table (an SQL view). I wish there was a little more powerful and more user-friendly Forms wizard.
>
>It works OK, but how do I change the code that is done on a click of a certain button.
>
>For example, I do NOT want to allow delete. I want to change the code that is activated on Delete CLICK.
>
>When I look at code on cmdDelete.click there is no code, but is does do the default code and you can see that by clicking on View Parent Code.
>
>****How do I prevent the Parent code from running? ***
>
>I will just ad my code on the click and then NOT run the parent code.
If you add your code to the button's click, you're overwritting the default behavior. If you want to use default code, you need to call dodefault.
E.g. suppose you added a new property lAllowDelete to the form.
Then your button's click would look like:
if thisform.lAllowDelete
dodefault()
endif
E.g. nothing would happen if you set your property to .f.
If it's not broken, fix it until it is.
My Blog