Solved

Form Updates

Posted on 2006-07-21
6
190 Views
Last Modified: 2010-04-23
I have a form that has a dat grid on it with a lot of information. When you select any row a second form comes up and allows you to make changes to the form. Once they hit updat I would like the data grid on the first form to be updated with the new data. I have the data grid code in a function call and it works fine. Please help.

Thanks
0
Comment
Question by:mwhodges
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17155163
When you are opening the "Update" form, how are you passing the row information to the form?  Are you sending the values of the each of the row cells, or are you passing the dataset/datatable/datarow?
0
 

Author Comment

by:mwhodges
ID: 17155181
I am passing the identyfing information and performing another qury he second form because there is more data then on the data grid that I am trying to display here. The first form while large is a summary of sorts.
0
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17155504
A few more questions:
-Does the update form need to stay open, and by this, does the user need to be able to change something, hit Update, change something, hit Update again, etc?
-Are you looking to refresh the entire grid, or just the row that was updated?
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:mwhodges
ID: 17155537
The entire grid would be ok. The 1st form is staying open I am showing the 2nd form in a show dialog.  THey will choose a row in the data grid the 2nd form is shown with all the information in it. They would make their changes hit update and the 2nd form would close and the data grid would be updated.
0
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 400 total points
ID: 17156120
Sounds easy enough :).  Which part are you missing?  

-------------Datagrid Form---------------
    Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Click
        dim frmUpdateForm as New UpdateForm(value, value, ...)
        frmUpdateForm.ShowDialog()

        'Upon reaching here, the Update form has been "closed", so refresh the grid
        RefreshDataGrid()
    End Sub

    Private Sub RefreshDataGrid()
      'Code to populate the Datagrid
    End Sub
-------------------------------------------

-------------Update Form---------------
    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
        'Database update code here

        Me.Hide()
    End Sub
-------------------------------------------
0
 

Author Comment

by:mwhodges
ID: 17156735
Sweet... I didnt know that the showdialog box freezes the code until it regains focus. Thanks a bunch.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question