EOMONTH or 1st DOMonth Functions In Query Grid - Help !

  • Thread starter Thread starter Dave Gibson
  • Start date Start date
D

Dave Gibson

Hi,

I am having some difficulties with an EOMONTH function in the query
grid. I get the "Undefined Function" message box appearing when trying
to use it. The "Help" facility says I need a specific *.dll file
installed in order to use the function. I have the specific *.dll file
installed on my PC but still keep getting the error message.

Is there some other function that I can use in the query grid that
will generate the first &/or last day of the month with some arguments
that will allow future and past months ro be chosen as well?

Regards
Dave
 
Troubleshooting steps:

Did you put the EOMONTH function in a regular module?

Is it a public function?

Is the regular module named differently than EOMONTH?

If you indeed need a dll file because the function is in that dll file, did
you add the dll file to the References in ACCESS's Visual Basic Editor?

You'll need to tell us a lot more about your setup if the above questions
don't get you to the answer. I personally am unfamiliar with any function
named EOMONTH.

However, note that the easy way to get the last day of a month is to use the
DateSerial function (see Help file for information about this VBA function)
with a slight "trick". Let's say you want to get the last day of February
2005:

LastDay = DateSerial(2005, 3, 0)
 
Dave Gibson said:
Hi,

I am having some difficulties with an EOMONTH function in the query
grid. I get the "Undefined Function" message box appearing when trying
to use it. The "Help" facility says I need a specific *.dll file
installed in order to use the function. I have the specific *.dll file
installed on my PC but still keep getting the error message.

The Access Help is confusing in this regard: it gives you a lot of Excel
functions which aren't available (without specifically referencing the Excel
program library anyway) in Access. EOMONTH is one of these.

Try DateSerial(Year(Date()), Month(Date()) + 1, 0) to get the end of the
current month, DateSerial(Year(Date()), Month(Date()), 1) to get the first.
 

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