DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: DataCombo & Refresh

  1. #1
    Bob Barnard Guest

    DataCombo & Refresh


    I have an MDI application, with multiple forms, one of which is
    a maintenance form. Users can add/update/delete from tables like
    state, country, etc. When this happens, I want the DataCombos
    in the other forms to reflect the changes (seems like something most applications
    would want to do). When I invoke the refresh or recordset.requery methods
    on the corresponding
    DataControls (is there a better way to have a DataCombo display
    a list of values?), the BoundText field on the DataCombos is
    set to zero. I have also tried set the cursor type to Open
    Dynamic (thinking changes in one form, would automatically
    update the recordset in the DataControl). I am setting the rowsource property
    in code and not at design time. Any thoughts?

    Thanks,
    Bob

  2. #2
    Roger Willcocks Guest

    Re: DataCombo & Refresh


    if you were using a datasource class
    you could make all 'country' combos (for example)
    use the same source object
    and also the updating form.
    then, when changes occurred through the form
    you could raise a DataMembersChanged
    event in the object
    which would cause all the combos using it to
    request the recordset again the next time they were used.

    Roger

    VB Programmers Journal have an article a couple of months ago on making DataClasses.

    Roger

    "Bob Barnard" <bbarnard@citglobal.com> wrote:
    >
    >I have an MDI application, with multiple forms, one of which is
    >a maintenance form. Users can add/update/delete from tables like
    >state, country, etc. When this happens, I want the DataCombos
    >in the other forms to reflect the changes (seems like something most applications
    >would want to do). When I invoke the refresh or recordset.requery methods
    >on the corresponding
    >DataControls (is there a better way to have a DataCombo display
    >a list of values?), the BoundText field on the DataCombos is
    >set to zero. I have also tried set the cursor type to Open
    >Dynamic (thinking changes in one form, would automatically
    >update the recordset in the DataControl). I am setting the rowsource property
    >in code and not at design time. Any thoughts?
    >
    >Thanks,
    >Bob



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center