Well here is the code I have gotten, but I can't seem to get the
GoToRecord formatted correctly:
Me!frmPaymentSubform.SetFocus
DoCmd.GoToRecord , acActiveDataObject, acGoTo, BillingPeriodEndDate =
"Between" & DateAdd("m", -3, Date) & "And" & DateAdd("m", -4, Date)
Please help. Thanks,
Todd
Carl Rapson - 11 Jun 2007 16:41 GMT
> Well here is the code I have gotten, but I can't seem to get the
> GoToRecord formatted correctly:
[quoted text clipped - 6 lines]
>
> Todd
You need spaces after 'Between' and around 'And'. Also, you might need to
bracket your dates with "#":
DoCmd.GoToRecord , acActiveDataObject, acGoTo, BillingPeriodEndDate =
"Between #" & DateAdd("m", -3, Date) & "# And #" & DateAdd("m", -4, Date) &
"#"
Carl Rapson