Hi All
The following code populate listbox but the date appears in wrong format(mm/dd/yyyy). It should be in dd/mm/yyyy format. Can anyone please modify the code accordingly.
strsql = "select count(*) as [Total Letters],username,Date1 from tblmaster where Date1 >= #" & Format(DateSerial(ComboBox3, ComboBox2, ComboBox1), "mm/dd/yyyy") & "# and date1 <= #" & Format(DateSerial(ComboBox6, ComboBox5, ComboBox4), "mm/dd/yyyy") & "# group by Date1,username"
rs.Open strsql, cn
ListBox1.Column = rs.GetRows
rs.Close