Results 1 to 3 of 3

Thread: ADO updating the underlying recordset

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Christchurch, New Zealand
    Posts
    12

    Red face

    I have a form with an ADO control on it and a couple of text fields. Everything works fine except once I add a new record using my add button and enter text in the text fields how do I make the ADO control update the underlying database with the text. Because if I move around using the ADO control I find the underlying database hasn't been fully updated. Example is the autonumber field (in my Access 97) database is blank, and if I try to requery the recordset I find the new data has dissappeared.

    If I add a new record then the old record seems to be placed in the underlying recordset.

    I hope I make sense here. Also is the best way to ensure the records are always ordered by one of the text fields having a SQL statement with ORDER BY in it and the requerying the recordset when any data changes, or is there a simpler way? Thanks

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696

    Question

    In your add button code I expect you have a recordset.addnew, but have you got a recordset.update after you have set the fields. Because if you haven't you will get the problem that you are saying.


    Hope this Helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Christchurch, New Zealand
    Posts
    12

    Thanks

    I tried it and it works perfectly

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