J
Junaid Hussain
Hi,
I have a MS Access database(Calls.mdb) which contains data for 'Calls
received' to a particular helpdesk . It contains the following columns;
1) Call ID [Number]
2) Status [Text]
3) date_Created [ DD/MM/YYYY HH:MM:SS]
I now want to create some reports in MS Excel using the data from the
database (Calls.mdb). I have created a macro in Excel which connects to the
database and runs the following code along with an SQL query.
//-----------------------------------
dim StartDate As Date
dim CloseDate As Date
StartDate = "01/05/2005 00:00:00"
CloseDate = "01/05/2005 23:59:59"
querySQL = "SELECT * FROM calls_logged WHERE date_Created between #" &
StartDate & "# AND #" & CloseDate & "# "
//-----------------------------------
The Access database contains records dating from 20/04/05 to 09/04/05. When
I run the the macro (the above code is a simplified extract) it returns all
the records from the database even though my aim with the above query is to
get only the records whose date lies on 01/05/2005. I cannot see any
problems with my code. Please can anyone help.
Regards,
Junaid Hussain
(Student)
I have a MS Access database(Calls.mdb) which contains data for 'Calls
received' to a particular helpdesk . It contains the following columns;
1) Call ID [Number]
2) Status [Text]
3) date_Created [ DD/MM/YYYY HH:MM:SS]
I now want to create some reports in MS Excel using the data from the
database (Calls.mdb). I have created a macro in Excel which connects to the
database and runs the following code along with an SQL query.
//-----------------------------------
dim StartDate As Date
dim CloseDate As Date
StartDate = "01/05/2005 00:00:00"
CloseDate = "01/05/2005 23:59:59"
querySQL = "SELECT * FROM calls_logged WHERE date_Created between #" &
StartDate & "# AND #" & CloseDate & "# "
//-----------------------------------
The Access database contains records dating from 20/04/05 to 09/04/05. When
I run the the macro (the above code is a simplified extract) it returns all
the records from the database even though my aim with the above query is to
get only the records whose date lies on 01/05/2005. I cannot see any
problems with my code. Please can anyone help.
Regards,
Junaid Hussain
(Student)