Hi All,

I am trying to update my form once the delete button is clicked. There are several fields like Name, Date, Date of Birth and so on. Once I delete a record I want the form to automatically load with new / updated data. This form fetches data from MS Access using OLEDB
I have spent a long long time trying this but did not get any solution.
Please help


Re: Vb form refreshing 80 80

You can refresh a form be using Me.Refresh , so you could get your data in variables such as :

TextBox1.Text = Name
TextBox2.Text = Date

etc, getting the variables from the database.
Watch Youtube Video On Connecting To Access Database (This is a 2 part video)
After loading data, call Me.Refresh() Watch Part 2

Re: Vb form refreshing 80 80

Hi Matthew,
Thank you so much for the reply. But this does not solve my problem. I have tried ME. Refresh() earlier as well.
Once i delete the data from the Db and when i call the function to display the form, the form wont update with the new values but shows the same values but when I click click the delete button again and when the form loads this time it will be updated.
I cannot understand why it is updating during the second instance but not during the first.

Thank you so much

Re: Vb form refreshing 80 80

Please provide your code. Refresh method only redraws the user interface, but don't fetch new data from you database. If you provide your code, we can have a better idea of what you want to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.