Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Click a button on an Access form
Message
 
À
30/09/2008 14:20:02
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01351878
Message ID:
01351881
Vues:
15
>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()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform