Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile error when converting to Access 2000

Status
Not open for further replies.

Knackers

Technical User
Apr 26, 2001
59
AU
Hi,

I have an Access '97 databease that I am trying to convert to 2000. When I do the conversion, it reports a compile error in a module that is used to calculate the difference between two dates. The module is as follows:

Public Function ReturnTheDate() As Date
Dim dteStart As Date
dteStart = Nz(rc.Fields("leavedate"), Now())
End Function

When I try to compile, it highlights the 'rc.' in the above statement and says that the variable is not defined.

I am not too good with Vb, but I assume that rc. is 'record'. Does anyone have any idea of why this would run in '97 and not 2000, and what I might do to make it compile successfully in 2000?

Thanks
 
I have delt with that only a little, but here is what I would try. Go to any VBA module window and click on the tools menu and pick references. You may see that a library reference is "missing". (That is why it isn't recognizing the rc because that was a 97 variable and not a 2000.) (I don't know what rc stands for) So, then you click on the missing reference and try to locate it on your system by going to the path it says it should be at. If it isn't there, you would have to find way to install it. You might also have to find out what the equivilant code in 2000 would be and re-right that piece. I hope I helped you a little. Dawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top