parameter date in sql

hope can reply me about this
i have Calendar and click on it to put the date in  2 textbox and then click button to get the data between this 2 date for example "10-january-03" and "10-march-03"
the problme my sql parameter accept only numbers??
and another thing it execute "month-day-year"
not "day-month-year"????
please tell me how can use date like"10-january-03"
in the parameter

Private Sub Command4_Click()
rec2.Open "select * from entry " & _
" where d Between #" & Text2 & "# And #" & Text3 & "#", cnn, , , adCmdText

greatfull for any reply
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

is the field called d in fact a Date/Time field in the database (I assume here that you are using Access as the back-end database???)

egkidAuthor Commented:
yep the date field in table name d

any suggestion??
You can use the format function. "select * from entry " & _
"where d between cDate(" & format(text2.text,"DD-MM-YYYY") & ") and cDate(" & format(text2.text,"DD-MM-YYYY") & ")"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

egkidAuthor Commented:
hello dwphilippe
thanks for reply
i did as u said

rec2.Open "select * from entry " & _
"where d between cDate(" & Format(Text2.Text, "DD-MM-YYYY") & ") and cDate(" & Format(Text3.Text, "DD-MM-YYYY") & ")", cnn, , , adCmdText

the report the empty hmmmmm
did i forget something?
egkidAuthor Commented:
i checked the table it have dates but report came empty
help please
egkidAuthor Commented:
hello dwphilipp
guess what
u r statment missed something that why report came empty
missing #
is it possible to change Calendar language?

thanks so much dwphilipp

egkidAuthor Commented:
here it is A:EXCELLENT
thanks again
please let me know if possible change Calendar language
For this you must create your on date with a two dimention array. The first dimention for the month and the second for the language.

dim strMonth(1 to 12, 1 to 3) as string
strMonth(1, 1) = "Januari"
strMonth(1, 2) = "Janvier"
strMonth(1, 3) = "January"

msgbox day(text2.text) & " " & strMonth(month(text2.text), language) & " " & year(text2.text)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.