Your code:
OleDbCommand cmd = new OleDbCommand("select * from patientdetail where refby=@refby AND datep BETWEEN @date1 AND @date2)", con);
You seem to have added an extra ')' at the end of you selection. Remove it and it should work.
Try:
OleDbCommand cmd = new OleDbCommand("select * from patientdetail where refby=@refby AND datep BETWEEN @date1 AND @date2", con);