JET dB Newbie Needs Help

T

Trip

Hello all,

I'm haveing a bit of a problem with writing to a jet dB and looking for
a little help.

The problem is that for some reason data is sudenly being written to
the end of the new data which is appearing BEFORE the older data. It
is as though JET does not recognize the fact that the older data even
exists. Each time a record is added it writes it to the end of the
more recent data and pushes down all the previously existing data.

This is how I open the dB and recordset: (please excuse word wraping)

Set eScalperDB = OpenDatabase("C:\Documents and Settings\My
Databases\eScalper.mdb")

Set rstTickData = eScalperDB.OpenRecordset("Table_Tick_Data",
dbOpenDynaset)

I then add to the dB as follows...

DateStamp = ThisWorkbook.Sheets("Data").Range("A2")
TimeStamp = ThisWorkbook.Sheets("Data").Range("B2")
LastTick = ThisWorkbook.Sheets("Data").Range("C2")
With rstTickData
.addnew
!Date_Stamp = DateStamp
!Time_Stamp = TimeStamp
!Last = LastTick
.Update
.bookmark = .LastModified
End With

According to Help, opening a record set as Dynaset means that data will
be written to the end of the file.


Any ideas????

Thanks!

Trip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top