Problem with line of VBA Code in Macro

  • Thread starter Thread starter Aaron Shumaker
  • Start date Start date
A

Aaron Shumaker

I'm running a macro in VBA (from MS access) - the macro
debugs when it gets to the line of code displayed below
and gives me the following message: "Compile Error:
Can't find project or library."

The code line that VBA debugs on is:

If Mid(DateAndTime.Value,1,3) = "Jan" Then

"MID" is highlighted. I don't know why this isn't working
because it worked for the past year and a half. Anyone
have any help? Thanks,
--aaron
 
Aaron,

Hint: in Access, macros and VBA procedures are very different
creatures.

Anyway, one possibility with your problem here is that it is related
to References. Go to any code module, look at the Tools|References
menu, and see if there are any of the ticked items with MISSING:
shown. For more information, see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

- Steve Schapel, Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top