I have this code when I open a form.
stLinkCriteria = "[Date]=" & Format(Now(), "yy-mm-dd")
stDocName = "FeuilleTemps"
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
When the form open a Filter is on and in the date criteria it's 5-9-20
And in my date field it's 05-09-20 , so the filter don't work.
And when I put
stLinkCriteria = "[Date]=" & "#" & Format(Now(), "yy-mm-dd") & "#"
The date criteria is now #20-05-09# and it's not what I want.
I want #05-09-20# (yy-mm-aa) automaticly in my criteria when my form open, because all my date is in that format.
I really need this to work and I don't have any clue to solve this problem.
Thanks for the help
stLinkCriteria = "[Date]=" & Format(Now(), "yy-mm-dd")
stDocName = "FeuilleTemps"
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
When the form open a Filter is on and in the date criteria it's 5-9-20
And in my date field it's 05-09-20 , so the filter don't work.
And when I put
stLinkCriteria = "[Date]=" & "#" & Format(Now(), "yy-mm-dd") & "#"
The date criteria is now #20-05-09# and it's not what I want.
I want #05-09-20# (yy-mm-aa) automaticly in my criteria when my form open, because all my date is in that format.
I really need this to work and I don't have any clue to solve this problem.
Thanks for the help