F
Frankie via AccessMonster.com
I have the following to achieve :
2 calcualted fields [Souplesse1] and [Souplesse2]on a query meant to return
a date value based on another calculated field [NbreJours] which itself
returns a number value in days to be added to and substracted from [DateFin]
field . The substraction goes to [Souplesse1] and addition goes to
[Souplesse2] and must appear as Date format dd/mm/yyyy.
Searching this newsgroup I have found some info about system date problem.
I did the folowing in my DB:
Created a module:
Option Compare Database
Public Function SQLDate(varDate As Variant) As String
If IsDate(varDate) Then
SQLDate = "#" & Format$(varDate, "dd\/mm\/yyyy") & "#"
End If
End Function
Then I type in the following in the [Souplesse2] field :
Format(AjDate("d";[NbreJours];[T_Missions].[DateFin]);"dd\/mm\/yyyy")
After I validate Access turns it into :
Format(AjDate("\d";[NbreJours];[T_Missions].[DateFin]);"""dd/""mm""/yy""")
So local settings still take over ! And I have an #error message.
Can someone help me understand what the solution to this problem is ?
Thank you in advance.
Frankie
MS Access 2003
2 calcualted fields [Souplesse1] and [Souplesse2]on a query meant to return
a date value based on another calculated field [NbreJours] which itself
returns a number value in days to be added to and substracted from [DateFin]
field . The substraction goes to [Souplesse1] and addition goes to
[Souplesse2] and must appear as Date format dd/mm/yyyy.
Searching this newsgroup I have found some info about system date problem.
I did the folowing in my DB:
Created a module:
Option Compare Database
Public Function SQLDate(varDate As Variant) As String
If IsDate(varDate) Then
SQLDate = "#" & Format$(varDate, "dd\/mm\/yyyy") & "#"
End If
End Function
Then I type in the following in the [Souplesse2] field :
Format(AjDate("d";[NbreJours];[T_Missions].[DateFin]);"dd\/mm\/yyyy")
After I validate Access turns it into :
Format(AjDate("\d";[NbreJours];[T_Missions].[DateFin]);"""dd/""mm""/yy""")
So local settings still take over ! And I have an #error message.
Can someone help me understand what the solution to this problem is ?
Thank you in advance.
Frankie
MS Access 2003