>I've got to the point where I can get a reference to a button on the Access form, but can't get it to do anything. oCmd.click returns a COM error (unknown name or some such), loDoCmd.run("cmdbutton_click") also doesn't... and of course I don't have access (pardon the poor pun, don't execute it) to the source code; I can get to the PEM window, but it's actually a property window, no E or M, can't see any code, only module names.
>
>Regarding any legalese concerns: the app is abandonware; I know the guy who wrote it and he vanished. I just want to make life simpler to my users, who have the licenses for this thing. I'd rather spend another day coding around this than to talk them through steps, what to do when and what to do when such-and-such message appears.
>
>So, my question is, how do I run the code which would run when oCmd is clicked? The P window says "[Event Procedure]".
Form Objects in VB (and .NET for that matter) don't have associated event-methods like VFP. To call the Click event you have to call the Method that is bound the Click Event. In this case "cmdButton_Click" which is a member of the Form. Try getting a reference to the form and calling the cmdButton_Click method
oForm.cmdButton_Click()