Access 2k to 2003 problem

P

Phill

I have an Access 2000 format database that no longer works after upgrading to
Office 2003. I get an error message saying "Data provider could not be
initialized." This is the code, the last line is where it is erroring out on.
The record is added, just can't set the recordset of the form to that
record. Any ideas? Thanks

Dim varItem As Variant
Dim dynCurrent As DAO.Recordset
Dim strFind As String

DoCmd.Echo False
DoCmd.Hourglass True

'Me.RecordSource = "DAR"
'Me.Requery
'RunCommand acCmdRecordsGoToNew
'Me.DAR_DATE = Date

Set dynCurrent = CurrentDb.OpenRecordset("DAR", dbOpenDynaset,
dbSeeChanges)
dynCurrent.AddNew
dynCurrent("DAR_DATE") = Date
dynCurrent.Update
dynCurrent.Bookmark = dynCurrent.LastModified
glngDarID = dynCurrent("DAR_ID")

Me.RecordSource = "SELECT * FROM DAR WHERE DAR_ID=" & glngDarID
 
Top