M
mramani
We recently converted from Office 97 to Office 2003. The macro in word97
worked greate in accessing Access97 database, but after the conversion the
marco gives the following error message.
Database is also converted.
Unrecognized database format <filename>. (Error 3343)
here is part of the coding:
Dim db As Database
Message = "Enter CASE NUMBER" ' Set prompt.
Title = "InputBox Demo" ' Set title.
Default = "0001" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
' Display Selection
' Selection.InsertBefore Text:=MyValue
If ActiveDocument.Bookmarks.Exists("caption") = True Then
ActiveDocument.Bookmarks("caption").Select
End If
'this where the error message happens.
Set db = OpenDatabase(Name:="O:\Databases\Database\PSCCases2003.mdb")
'Set rs = db.OpenRecordset(Name:="casecaptions")
Set rs = db.OpenRecordset("SELECT CaseCaptions.[Case Number],
CaseCaptions.Caption_for_case FROM CaseCaptions where [Case Number] = '" &
MyValue & "'")
NumRec = rs.RecordCount
worked greate in accessing Access97 database, but after the conversion the
marco gives the following error message.
Database is also converted.
Unrecognized database format <filename>. (Error 3343)
here is part of the coding:
Dim db As Database
Message = "Enter CASE NUMBER" ' Set prompt.
Title = "InputBox Demo" ' Set title.
Default = "0001" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
' Display Selection
' Selection.InsertBefore Text:=MyValue
If ActiveDocument.Bookmarks.Exists("caption") = True Then
ActiveDocument.Bookmarks("caption").Select
End If
'this where the error message happens.
Set db = OpenDatabase(Name:="O:\Databases\Database\PSCCases2003.mdb")
'Set rs = db.OpenRecordset(Name:="casecaptions")
Set rs = db.OpenRecordset("SELECT CaseCaptions.[Case Number],
CaseCaptions.Caption_for_case FROM CaseCaptions where [Case Number] = '" &
MyValue & "'")
NumRec = rs.RecordCount