Code:
Do While Not sample.Recordset.EOF
mk_datechn.Mask = "##/##/####"
mk_datechn.Mask = CDate(sample.Recordset!cd_flight_Date)
awb_update.RecordSource = "select sum(awb_master.gross_wt)frtgrswt, sum(awb_master.total_amt)as frttotamt, sum(total_handlingchg) as handling from awb_master where flight_name='" + Trim(sample.Recordset!cd_flight_name) + "' and stncode='" + Trim(memm.stncodee) + "' and nature_and_quality_of_good='courier' and flight_date ='" + Trim(Str(Year(mk_datechn.Text))) + "/" + Trim(Str(Month(mk_datechn.Text))) + "/" + Trim(Str(Day(mk_datechn.Text))) + "'"
awb_update.Refresh
Trim(Str(Year(m k_datechn.Text) )) in this masked_bok here show only ='0_/10/2010' actually i am putting in the date filed is 09/10/2010 and when ever is 9 date 9 month it show this error type mistake