FoxProProgrammer
Programmer
Hi,
I wrote a small application using Access 2000 for somebody that has Access 97. When I convert the database to Access 97 format, Access displays a message that says:
Your computer is missing at least one of the Microsoft Access 97 object libraries. Your converted database will not work until you open this database using Acess 97 and then fix any missing references.
Can anyone tell by looking at my code (below) which References that I need to add? I would guess that the db= and rs= statements are the culprits, but I'm not sure.
Thanks a lot!
________
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MAKE_SCADC_MRO_XLS_TBL", dbOpenDynaset)
While Not rs.EOF
If Not IsNull(rs!RECEIVING_DOCUMENT) Then
rs.Edit
rs!DateDiff = DteDiff(rs!RECEIVING_DOCUMENT, rs!DATE_RCV)
rs.Update
rs.MoveNext
Else
rs.MoveNext
End If
Wend
MsgBox "Finished Updating Table!", vbInformation + vbOKOnly
End Sub
Function DteDiff(RECEIVING_DOCUMENT As String, DATE_RCV As Date) As Integer
Dim recday As String
Dim recyear As String
Dim receiveDteConv As Date
recday = Mid(RECEIVING_DOCUMENT, 8, 3)
recyear = Mid(RECEIVING_DOCUMENT, 7, 1)
Select Case recyear
Case 0 To 3
recyear = 2000 + recyear
Case 4 To 9
recyear = 1990 + recyear
Case "-"
recyear = 2003
Case Else
recyear = 2003
End Select
receiveDteConv = DateAdd("d", recday - 1, DateValue("01/01/" & recyear))
DteDiff = DateDiff("d", receiveDteConv, DATE_RCV)
End Function
dz
dzaccess@yahoo.com
I wrote a small application using Access 2000 for somebody that has Access 97. When I convert the database to Access 97 format, Access displays a message that says:
Your computer is missing at least one of the Microsoft Access 97 object libraries. Your converted database will not work until you open this database using Acess 97 and then fix any missing references.
Can anyone tell by looking at my code (below) which References that I need to add? I would guess that the db= and rs= statements are the culprits, but I'm not sure.
Thanks a lot!
________
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MAKE_SCADC_MRO_XLS_TBL", dbOpenDynaset)
While Not rs.EOF
If Not IsNull(rs!RECEIVING_DOCUMENT) Then
rs.Edit
rs!DateDiff = DteDiff(rs!RECEIVING_DOCUMENT, rs!DATE_RCV)
rs.Update
rs.MoveNext
Else
rs.MoveNext
End If
Wend
MsgBox "Finished Updating Table!", vbInformation + vbOKOnly
End Sub
Function DteDiff(RECEIVING_DOCUMENT As String, DATE_RCV As Date) As Integer
Dim recday As String
Dim recyear As String
Dim receiveDteConv As Date
recday = Mid(RECEIVING_DOCUMENT, 8, 3)
recyear = Mid(RECEIVING_DOCUMENT, 7, 1)
Select Case recyear
Case 0 To 3
recyear = 2000 + recyear
Case 4 To 9
recyear = 1990 + recyear
Case "-"
recyear = 2003
Case Else
recyear = 2003
End Select
receiveDteConv = DateAdd("d", recday - 1, DateValue("01/01/" & recyear))
DteDiff = DateDiff("d", receiveDteConv, DATE_RCV)
End Function
dz
dzaccess@yahoo.com