troubleshooting Question


Avatar of FCapo
FCapo asked on
Visual Basic.NET
4 Comments1 Solution492 ViewsLast Modified:

I have two forms that access the same database, the second form adds new records to the table while the first form reads from it.

When I add a new record in the second form and I press OK, I am returned to the first form, my problem is that the first form does not show the newly added record, I have to close the entire program and re-load it in order to see the changes.

I'm wondering if there's a way once I add a new record to update the bindingsource in the first form to reflect the new changes.

the following is the code I use in the first form to read from the table

Dim prjData As ClientsAccess
Dim prjDataset As nclMisDataSet
Dim WithEvents prjBindingSource As BindingSource

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        prjData = New ClientsAccess
        prjDataset = prjData.getPrjAccessDataSet
        prjBindingSource = New BindingSource

       With prjBindingSource
            .DataSource = prjDataset
            .DataMember = "projets"
        End With

Thank you,

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros