Hi @John , Welcome to Microsoft Q&A,
Your problem may be that the database data accessed when loading a new form is not updated.
Your code snippet shows a click event handler for the save button, but it only updates the data bound to tenantsBindingSource
and addressesBindingSource
. If you want to ensure that the data is updated when the application starts, you can add code for the data update in the form load event.
You can try adding the following code in the form load event to ensure the data is updated when the application starts:
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code may be slightly adjusted based on your actual data source
this.tenantsTableAdapter.Fill(this.namesDataSet.Tenants);
this.addressesTableAdapter.Fill(this.namesDataSet.Addresses);
}
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.