JayBeeOH

MS Access 1st App - MainForm.vb

Jul 22nd, 2015
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.37 KB | None | 0 0
  1. '------------------------------------------------------------------------------------------
  2. '           Notice of My Copyright and Intellectual Property Rights
  3. '
  4. ' Any intellectual property contained within the program by Joseph L. Bolen remains the
  5. ' intellectual property of the Joseph L. Bolen. This means that no person may distribute,
  6. ' publish or provide such intellectual property to any other person or entity for any
  7. ' reason, commercial or otherwise, without the express written permission of Joseph L. Bolen.
  8. '
  9. '                 Copyright © 2015. All rights reserved.
  10. '        All trademarks remain the property of their respective owners.
  11. '-------------------------------------------------------------------------------------------
  12. ' Program Name:   MS Access 1st App
  13. '
  14. ' Author:         Joseph L. Bolen
  15. ' Date Created:   July 2015
  16. '
  17. ' Description:    MS Access 1st App
  18. '
  19. '                 Documentation is at:
  20. '                   App's Visual Basic .NET code is at http://pastebin.com/Y2v7WEKB
  21. '                   Video tutorial at YouTube: http://www.youtube.com/user/bolenpresents
  22. '
  23. '-------------------------------------------------------------------------------------------
  24. Public Class MainForm
  25.  
  26.     Private Sub CustomersBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) _
  27.         Handles CustomersBindingNavigatorSaveItem.Click
  28.  
  29.         Me.Validate()
  30.         Me.CustomersBindingSource.EndEdit()
  31.         Me.OrdersBindingSource.EndEdit()
  32.         Me.TableAdapterManager.UpdateAll(Me.SampleDBDataSet)
  33.  
  34.     End Sub
  35.  
  36.     Private Sub MainForm_Load(sender As Object, e As EventArgs) _
  37.         Handles MyBase.Load
  38.  
  39.         OrdersDataGridView.ColumnHeadersDefaultCellStyle.Font = New Font(OrdersDataGridView.Font, FontStyle.Bold)
  40.  
  41.         'TODO: This line of code loads data into the 'SampleDBDataSet.Customers' table. You can move, or remove it, as needed.
  42.         Me.CustomersTableAdapter.Fill(Me.SampleDBDataSet.Customers)
  43.         'TODO: This line of code loads data into the 'SampleDBDataSet.Orders' table. You can move, or remove it, as needed.
  44.         Me.OrdersTableAdapter.Fill(Me.SampleDBDataSet.Orders)
  45.     End Sub
  46.  
  47.     Private Sub OrdersBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) _
  48.         Handles OrdersBindingSource.AddingNew
  49.  
  50.         Me.CustomersBindingSource.EndEdit()
  51.     End Sub
  52. End Class
Advertisement
Add Comment
Please, Sign In to add comment