select the record based on date from the text box
hai,
I want to select the records based on date which is diisplayed on the text box. i tried but i didn' get. please help.
(i.) select * from tabname where bdate = ' & text1.text
select * from bdate where bdate = ' " Text1.text & " ' "
Both of the queries are not working . I have tried cdate and ltrim
thanks
indra
[366 byte] By [
varunindu] at [2007-11-11 10:02:26]

# 2 Re: select the record based on date from the text box
I am using Access database, the field name is Db_date, and the format is date / time. The value of text1.text = 19/08/1985, Thanks for ur reply.
# 3 Re: select the record based on date from the text box
They are not working giving errors or give no result ? if the first it's because u haven't good tiped the query , if the second u may haven't good writen the text format , is it a normal textbox ? have u tried to make the textbox format as date ?
Amahdy at 2007-11-11 17:25:25 >

# 4 Re: select the record based on date from the text box
Access requires that date values be in mm/dd/yyyy format, and that they be surrounded by hash characters (#). Try this:
SELECT * FROM bdate WHERE bdate = #" & Format(Text1.Text, "MM/dd/yyyy") & "#"
# 5 Re: select the record based on date from the text box
Hello ,
I works fine. Thanks a lot. I tried with #, but in a wrong way. Thanks for ur help.
indra