DateDiff

S

Stephanie

Hi. I've been using this statement to get user input and
perform DateDiff:
Expr1: DateDiff("m",Max([MembershipType].
[DateOfLastRenewal]),[Reference date for Renewals:
(MM/DD/YY)],True)

I'm like to change [Reference date for Renewals:
(MM/DD/YY)]
to reflect an input form DateParam with unbound field
FindDate. Generally when I use the input form, I have a
combo box with a bound coulmn to an ID and the second
column as something the user would understand (01,
January). But here I'm just using a plain user typed date
field. It's not working. I don't know if the concept is
convoluted or if my syntax is wrong. I tried
Expr1: DateDiff("m",Max([MembershipType].
[DateOfLastRenewal]),[DateParam.FindDate],True) with the
criteria set to forms![DateParam]![FindDate] but that
didn't work.

Any suggestions? Detail are very nice. Thanks, Stephanie
 
K

Ken Snell [MVP]

This should work for you:

Expr1:
DateDiff("m",Max([MembershipType].[DateOfLastRenewal]),[Forms]![DateParam]![FindDate])

I don't know why you're putting True in for the fourth argument of
DateDiff...that value has no meaning to DateDiff for that argument.
 
S

Stephanie

Geez! The one thing I didn't try! Thanks for the syntax
help and the DateDiff lesson. Cheers, Stephanie
-----Original Message-----
This should work for you:

Expr1:
DateDiff("m",Max([MembershipType].[DateOfLastRenewal]), [Forms]![DateParam]![FindDate])

I don't know why you're putting True in for the fourth argument of
DateDiff...that value has no meaning to DateDiff for that argument.

--

Ken Snell
<MS ACCESS MVP>

Hi. I've been using this statement to get user input and
perform DateDiff:
Expr1: DateDiff("m",Max([MembershipType].
[DateOfLastRenewal]),[Reference date for Renewals:
(MM/DD/YY)],True)

I'm like to change [Reference date for Renewals:
(MM/DD/YY)]
to reflect an input form DateParam with unbound field
FindDate. Generally when I use the input form, I have a
combo box with a bound coulmn to an ID and the second
column as something the user would understand (01,
January). But here I'm just using a plain user typed date
field. It's not working. I don't know if the concept is
convoluted or if my syntax is wrong. I tried
Expr1: DateDiff("m",Max([MembershipType].
[DateOfLastRenewal]),[DateParam.FindDate],True) with the
criteria set to forms![DateParam]![FindDate] but that
didn't work.

Any suggestions? Detail are very nice. Thanks,
Stephanie


.
 

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

Similar Threads


Top