Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Control Source in Sub Forms
I am having a big problem trying to figure out the best way of passing variable references to sub forms for the control sources of text boxes etc. For example, I have a container class setup for a grid that includes add, edit and delete buttons. When the user clicks add, another small form class pops up on top of the grid with the related fields contained in it. We are using sql server with an ado connection, so the control source must be something like oobject.customer.customer_nme. But I can't use a public variable like oobject as the control source as multiple sub forms can be open at once and they would conflict with each other. So I have been trying to pass an object reference to the form but this goes to the Init method which fires after all of the text boxes do so it is too late. It would be nice to be able to pass it to the load event but I don't think that's possible? The control source could then be thisform.oobject.customer.name. Any suggestions?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement