|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cascade changed data in open formsWhat are some of the methods you guys have used to update data in forms
that has been changed by another open form? For example I might open an form to edit an employee, and when I close it I would want to update any comboboxes or listboxes that might contain a list of employees. In MS Access I used to handle this by looping through all open forms, then looping through all listbox or combobox controls and calling their ..requery method. I'm writing a new app in VB 2005 and was brainstorming some ways to handle my data syncing needs. I want to do something that is reusable throughout the app. For the example above I know that I can explicitly update the controls, and I could even limit this to happen only if that specific form is open. However I want a system where i can call a sub and it knows if any open forms need to be 'refreshed'. Maybe I could keep some sort of control collection with control names and the nature of the data that they hold. Any suggestions to get me started? Bryan wrote:
Show quoteHide quote >What are some of the methods you guys have used to update data in forms Bind the controls to the dataset. When you update in one form, the >that has been changed by another open form? For example I might open >an form to edit an employee, and when I close it I would want to update >any comboboxes or listboxes that might contain a list of employees. In >MS Access I used to handle this by looping through all open forms, then >looping through all listbox or combobox controls and calling their >.requery method. I'm writing a new app in VB 2005 and was >brainstorming some ways to handle my data syncing needs. I want to do >something that is reusable throughout the app. For the example above I >know that I can explicitly update the controls, and I could even limit >this to happen only if that specific form is open. However I want a >system where i can call a sub and it knows if any open forms need to be >'refreshed'. Maybe I could keep some sort of control collection with >control names and the nature of the data that they hold. Any >suggestions to get me started? > > > other form will already have the updated data. Tom
Why does Replace return Nothing???
VC6 ATL DLL interop with VB.NET All the king's horses and all the king's men....... How do I determine if a control has a specific property i need timer interval more than 1 Minute. Class Inheritance Should I use XML as a database for a standalone app? Mail attachment from memory Determine if a File exists string value to new form instance? |
|||||||||||||||||||||||