From Andy,

I have a small problem. My problem is I am extracting Data within a specified Date range, but the Output is not as expected. i.e. no records are selected.

This is the syntax that I used :-
mfromdate contains '01/01/2000' mTodate contains '01/02/2000'

dim m_cond as string , mfromdate as Variant, mtodate as variant
m_cond = m_cond + IIf(rangeClick.Value = 1, " Install.Install_dt Between cdate('" & mFromDate & "') and cdate('" & mToDate & "') ", "")


sqlString = "Insert into InstallReport "
sqlString = sqlString + "Select Install.Install_no, Install.Install_dt, "
sqlString = sqlString + "Install.Cust_id, Customer.Name,Install.site_name,Install.inv_no,Install.inv_dt,Dsp_dtl.model_cd,Dsp_dtl.value "
sqlString = sqlString + "from (Install inner join Customer on Install.cust_id = Customer.cust_id) left join Dsp_dtl ON Install.inv_no = Dsp_Dtl.inv_no "
sqlString = sqlString +"where Install.Install_Status = 'P' and "
sqlString = sqlString + m_cond + ";"
db.Execute sqlString

When I execute the Sql it does not show any records, whereas it has to
show 1 record which satisfies the condition.

Please help me Out with this Problem

regards,

AndyR. Rego