Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference a combobox on a form that is not the active fo
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00414326
Message ID:
00414636
Views:
18
Jim,

Making the second form do this seriously breaks encapsulation. Why not just structure you code like this:

DO FORM AddVendor (assumed it's a modal form)
this.cboListOfVendors.Requery()

If the AddVendor form is not modal you could pass a reference to the form to the other form when you launch it. Then the other form can send a message back to the first form:

DO FORM AddVendor with thisform

AddVendor.Init:
lparameter roCallerForm

this.oCaller = roCallerForm

then when you want to inform the other form of the changes

thisform.oCaller.UpdateVendors()


>How do you reference a combobox on a form that is not the active form? I open a new form to add a vendor and want to requery the combobox so it has the updated vendor, but it is on another form that is present as soon as I close the vendor add form. I have always used thisform.etc.etc, but what do you use if it is not on thisform?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform