DateDiff

R

Rhys Davies

Hi - im being a bit slow this monday morning so if someone could please help
then that would be great!

i have fullpaydateto and fullpaydatefrom where i enter the dates that the
person is to be off on full pay e.g. 01/09/2007 , 28/09/2007.

i then have a field called fullpaynoweeks where i want it to display the
number of weeks that the user will be off for based on the dates entered in
the fields above on exit of fullpaydatefrom. My code is below but doesnt
work, me!fullpaynoweeks - null in VBA when debugging.
Me!fullpaynoweeks = DateDiff(w, [fullpaydateto], [fullpaydatefrom])

Thanks,

Rhys.
 
R

Rhys Davies

aagh - flamin quotation marks!

thanks!

Maurice said:
Try this

Me!fullpaynoweeks = DateDiff("w", [fullpaydateto], [fullpaydatefrom])

hth
--
Maurice Ausum


Rhys Davies said:
Hi - im being a bit slow this monday morning so if someone could please help
then that would be great!

i have fullpaydateto and fullpaydatefrom where i enter the dates that the
person is to be off on full pay e.g. 01/09/2007 , 28/09/2007.

i then have a field called fullpaynoweeks where i want it to display the
number of weeks that the user will be off for based on the dates entered in
the fields above on exit of fullpaydatefrom. My code is below but doesnt
work, me!fullpaynoweeks - null in VBA when debugging.
Me!fullpaynoweeks = DateDiff(w, [fullpaydateto], [fullpaydatefrom])

Thanks,

Rhys.
 

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