Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Location
    UK
    Posts
    78

    Unanswered: INSERT INTO doesn't reflect in tables till table closed then re-opened Access 97

    Hello all!
    Ive been up for 37hrs now getting this thing ready for tomorrow AM I am almost there.... Here is my code. It runs fine no errors, but when i open the bookings table the records arnt there? If I then close the table and open it again... hey presto bookings. Can anyone help me solve this one?

    Dim ssql As String
    Dim dbs As Object
    Dim myDate As Date
    Set dbs = CurrentDb
    myDate = Format(Date, "mm/d/yyyy") ' Convert to Date data type.


    ssql = "INSERT INTO Bookings(DateBooked) VALUES (#" & myDate & "#)"
    CurrentDb.Execute ssql
    CurrentDb.Close


    Cheers Dap
    the light is on, someone is home, but they dont know they are. HELLO!

  2. #2
    Join Date
    Oct 2003
    Posts
    706

    Wink

    It sounds like you have an open transaction that hasn't been committed.

    (he said, fuzzily... vaguely...)
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  3. #3
    Join Date
    Aug 2003
    Location
    UK
    Posts
    78
    Originally posted by sundialsvcs
    It sounds like you have an open transaction that hasn't been committed.

    (he said, fuzzily... vaguely...)

    Thanks err ok. Ill look INTO it and try and commit? Back to the SQL manual.
    the light is on, someone is home, but they dont know they are. HELLO!

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Dap,

    Naw ... It's not a transaction issue unless you established one ... This sounds like the infamous 5 sec delay in the Jet/ODBC engine used in VB/VBA ... Basically wait 5-6 secs and requery.

Posting Permissions

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