working with dates

  • Thread starter Steven Phillips via AccessMonster.com
  • Start date
S

Steven Phillips via AccessMonster.com

When I try to use workday() or eomonth() functions I get the NAME?. I have
checked for the MSOWCF.dll file and it is there. The references (ctrl+g)
show the box checked for this also. Any ideas?
Thanks
 
G

George Nicholson

Access XP VBE:
*************************
Dim OCATP As MSOWCFLib.OCATP
Dim y As Double
Set OCATP = New MSOWCFLib.OCATP
y = OCATP.EOMONTH(38427, 2)
MsgBox y
*************************
(some of that may be overkill, but not much)
38427 = March 16, 2005
message box displays 38503 which equals May 31, 2005

Since you stated you were getting NAME? as a result, I suspect you are
trying to use these functions directly on a Form, Report or Query. I doubt
that you can. You can convince VB to recognize them, but I doubt Access
Forms/Reports/Queries will acknowledge the existence of anything that isn't
native to it's object model unless you create a wrapper function that
references MSOWCFLib as above. Up to you whether it is worth it.
 

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

Top