#Name and #Error

arunakumari02

Registered User.
Local time
Today, 13:30
Joined
Jun 2, 2008
Messages
91
When I am trying to print =FirstDayOfMonth(Now()) it gives error.

Please check the attachment.
 

Attachments

MSAccessRookie gave you a very detailed and good example of how it works. Anyways, change =firstdayofmonth(Now()) to =now(). If you explain what exactly you want..that helps alot...and you may get some different ways to get your output.
 
Last edited:
I cant understand whether your question is answered properly (looking both thread didnt find exact answer)

actually when you write =FirstDayOfMonth(Now()) you are calling a function FirstDayOfMonth which is not in your database may you have seen this in some other database and used it in your own databse without copying the function

however you can do it directly without calling a function by using dateserial function
below are some examples


First Day of Month
=DateSerial(Year(Date()),Month(Date()),1)


Last Day of Month
=DateSerial(Year(Date()),Month(Date())+1,0)


First Day of Previous Month
=DateSerial(Year(Date()),Month(Date())-1,1)


Last Day of Previous Month
=DateSerial(Year(Date()),Month(Date()),0)


First Day of Next Month
=DateSerial(Year(Date()),Month(Date())+1,1)


Last Day of Next Month
=DateSerial(Year(Date()),Month(Date())+2,0)


Hope its clear now
 

Users who are viewing this thread

Back
Top Bottom