Results 1 to 5 of 5

Thread: Form and Recordset Refreshing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Post

    I am using DAO to an Access DB. When my app fires it creates a recordset and fills a form. If a user wants to enter another record they hit an "Add" button which opens another window on top of the main window. The user inputs the data and clicks a button to enter the data and the "Add" form closes bringing the user back to the main screen. The problem arises when they move through the records of the main window. The new record is not there because I load the recordset when the main page opens. How can I pop the "Add" window and then refresh the recordset of the main window when the user inputs the new information? If I can do that then the record that the user just added will appear on the main screen. In other words I need to close the main window and open it back up to refresh the recordset.

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Post

    You should be able to just run the refresh method of the recordset. You don't need to reload the form.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Post

    For some reason that does not work, tried it. When the "Add" button is clicked and the info is stuffed into the DB and the main screen is again displayed it is the same, it does not refresh. It is almost like I have to completely close the main screen and re-open it to get the recordset to refresh and show the new data, a real pain.

  4. #4
    Member
    Join Date
    Jan 2000
    Location
    Singapore
    Posts
    59

    Post

    This is most common problem every body is facing.I also faced the same problem.
    As per your message you are opening another form for the data input .

    You Please try this way it may work.
    You please open a recordset again to fetch all the records from the database where you had placed the coding for updating the new record, and map it to the corresponding text boxes in the main form. I forgot the coding which I did long before.

    Still you need clarification let me know about it. I will try to search for that.

    thanks
    karun

    Just I tried it is working.



    [This message has been edited by karunakaran (edited 02-08-2000).]

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Post

    GOT IT WORKING! I changed the value of the form_load to form_activate and that did it. I am a rookie at coding and this is my fist project, guess I lucked out! Hopefully I will not run into any further problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width