G
Guest
Hi folks
I'm calling a function from inside a DoCmd.RunSQL as follows
PostBack = "UPDATE Contracts SET Contracts.due =
PreviousBillingDate([frequency],#" & SelectedDate & "#)" _
& "WHERE (Contracts.contpk)=" & SelectedCont
The function accepts the parameters and performs a simple task i.e.
PreviousBillingDate = DateAdd("d", -7, d)
Sometimes it works and sometimes it doesn't. When it doesn't work the date
appears in US format i.e. 12/3/2005 when I really mean it to be in UK format
3/12/2005
I cannot understand why the behavior occurs. I have tried accepting the
parameter As Variant and As Date.
Again, sometimes it works. Can anyone help
Fairly urgent please
TIA, Simon
I'm calling a function from inside a DoCmd.RunSQL as follows
PostBack = "UPDATE Contracts SET Contracts.due =
PreviousBillingDate([frequency],#" & SelectedDate & "#)" _
& "WHERE (Contracts.contpk)=" & SelectedCont
The function accepts the parameters and performs a simple task i.e.
PreviousBillingDate = DateAdd("d", -7, d)
Sometimes it works and sometimes it doesn't. When it doesn't work the date
appears in US format i.e. 12/3/2005 when I really mean it to be in UK format
3/12/2005
I cannot understand why the behavior occurs. I have tried accepting the
parameter As Variant and As Date.
Again, sometimes it works. Can anyone help
Fairly urgent please

TIA, Simon