none
Visual basic 2015 and Access database. RRS feed

  • Question

  • Hi

    How to create an database application in  Visual basic 2015 using Access Database. I want to add following functionality:

    1. Text Boxes on form to show ,update delete and add records.

    2.Search records.

    Friday, March 3, 2017 3:37 PM

Answers

  • That's a fair amount of information to cover, and there are different methods you can use, so you may want to try reading through a tutorial that will cover most of what you are looking to do.

    http://www.homeandlearn.co.uk/NET/nets12p1.html


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by sheelnath Monday, March 6, 2017 1:16 PM
    Friday, March 3, 2017 4:40 PM
  • Hi PaulThe one which uses code.

    It doesn't look like there is any code in there to refresh the data. What you will need to do is run the code again that queries the database and fills the DataSet and TextBoxes on the Form. On the below page it's the btnLoad_Click Event:

    http://www.homeandlearn.co.uk/NET/nets12p6.html

    You might want to move that code into its own Sub so you can run it again after adding, updating or deleting a record. For example, after adding one or more records you click the Commit button which would run the Update code and then you would call the Sub that reloads the data from the database. Hope this makes sense.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by sheelnath Thursday, March 9, 2017 4:22 PM
    Wednesday, March 8, 2017 2:35 PM

All replies

  • That's a fair amount of information to cover, and there are different methods you can use, so you may want to try reading through a tutorial that will cover most of what you are looking to do.

    http://www.homeandlearn.co.uk/NET/nets12p1.html


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by sheelnath Monday, March 6, 2017 1:16 PM
    Friday, March 3, 2017 4:40 PM
  • Hi Paul

    In above access database example to see the new record (Which we added) we have to first close the program and then again restart it than new record is visible. Is there any option (line of code to refresh data table so as to see the new record than and there itself) to see the new record.

    Monday, March 6, 2017 2:16 PM
  • Hi Paul

    In above access database example to see the new record (Which we added) we have to first close the program and then again restart it than new record is visible. Is there any option (line of code to refresh data table so as to see the new record than and there itself) to see the new record.


    When I click on the Save button the new record is added and visible. If I click the back button and then forward button I also see the new row. Is this not what you are seeing?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Monday, March 6, 2017 9:46 PM
  • Yes , not able to see new Row.
    Tuesday, March 7, 2017 3:19 PM
  • Yes , not able to see new Row.

    Which example are you working with? Is it the first example in the tutorial, which uses the BindingNavigator control? Or, is it the example that uses code?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, March 7, 2017 6:17 PM
  • Hi PaulThe one which uses code.
    Wednesday, March 8, 2017 2:05 PM
  • Hi PaulThe one which uses code.

    It doesn't look like there is any code in there to refresh the data. What you will need to do is run the code again that queries the database and fills the DataSet and TextBoxes on the Form. On the below page it's the btnLoad_Click Event:

    http://www.homeandlearn.co.uk/NET/nets12p6.html

    You might want to move that code into its own Sub so you can run it again after adding, updating or deleting a record. For example, after adding one or more records you click the Commit button which would run the Update code and then you would call the Sub that reloads the data from the database. Hope this makes sense.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by sheelnath Thursday, March 9, 2017 4:22 PM
    Wednesday, March 8, 2017 2:35 PM