>I have made those changes, but still get a "method or data member not
>found" compile error on rs.CITY.
>
> "Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
> news:exmE11$1GHA.476[ at ]TK2MSFTNGP06.phx.gbl...
>> Hi,
>> make sure you have a reference to DAO360, replace DB_OPEN_DYNASET with
>> dbOpenDynaset and declare Dim rs As DAO.Recordset
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>>
http://alexdyb.blogspot.com>>
http://www.PointLtd.com>>
>> "Wolfgang" <wolfgang[ at ]wafflehouse.com> wrote in message
>> news:%23ZQBXy$1GHA.4632[ at ]TK2MSFTNGP03.phx.gbl...
>>> Hi all.
>>> I am in the process of updating an access 97 database to access 2003.
>>> Unitaddr is a linked foxpro table. I am looking for the city based on
>>> the field unit in that table(this is the numeric representation of a
>>> location).
>>> The following function worked fine in 97, but will not compile in 2003
>>> on the rs.city line.
>>>
>>> Function fnCity(RUnit)
>>> On Error Resume Next
>>> Dim DB As Database
>>> Dim rs As Recordset
>>> Set DB = CurrentDb()
>>> Set rs = DB.OpenRecordset("unitaddr", DB_OPEN_DYNASET)
>>> rs.FindFirst "[Unitnbr]= " & RUnit & " "
>>> If rs.NoMatch Then
>>> fnCity = "City not Found!"
>>> Else
>>> fnCity = rs.CITY
>>> End If
>>>
>>> rs.Close
>>>
>>> End Function
>>>
>>> Where do I start to correct this problem?
>>> Thank yoiu for your help.
>>> Wolfgang
>>>
>>
>
>