Start\End Date Query

  • Thread starter Thread starter Rohit Thomas
  • Start date Start date
R

Rohit Thomas

Hello All,

I'm have the following query attached to a combo box
called cmbStartDate:

SELECT DISTINCT [qryBank001TellerFifty&Under].FileDate
FROM [qryBank001TellerFifty&Under] WHERE
((([qryBank001TellerFifty&Under].FileDate) Is Not Null))
ORDER BY [qryBank001TellerFifty&Under].FileDate DESC;

I have another combo box called cmbEndDate in which I
would like to use a similar select query but have the
query only show dates that are greater than the date
selected in cmbStartDate.

Any help would be appreciated.

Thanks,
Rohit Thomas
 
In the cmbStartDate AfterUpdate eventhandler, place code
similar to
cmbEndDate.RowSource = "SELECT DISTINCT
[qryBank001TellerFifty&Under].FileDate
FROM [qryBank001TellerFifty&Under] WHERE
((([qryBank001TellerFifty&Under].FileDate) Is Not Null))
AND ([qryBank001TellerFifty&Under].FileDate) > #" &
Format(" & cmbStartDate.Value, 'dd/mm/yy') & "#
ORDER BY [qryBank001TellerFifty&Under].FileDate DESC;"

Hope This Helps
Gerald Stanley MCSD
 
Thank you very much Gerald. That did the trick.

Rohit
-----Original Message-----
In the cmbStartDate AfterUpdate eventhandler, place code
similar to
cmbEndDate.RowSource = "SELECT DISTINCT
[qryBank001TellerFifty&Under].FileDate
FROM [qryBank001TellerFifty&Under] WHERE
((([qryBank001TellerFifty&Under].FileDate) Is Not Null))
AND ([qryBank001TellerFifty&Under].FileDate) > #" &
Format(" & cmbStartDate.Value, 'dd/mm/yy') & "#
ORDER BY [qryBank001TellerFifty&Under].FileDate DESC;"

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hello All,

I'm have the following query attached to a combo box
called cmbStartDate:

SELECT DISTINCT [qryBank001TellerFifty&Under].FileDate
FROM [qryBank001TellerFifty&Under] WHERE
((([qryBank001TellerFifty&Under].FileDate) Is Not Null))
ORDER BY [qryBank001TellerFifty&Under].FileDate DESC;

I have another combo box called cmbEndDate in which I
would like to use a similar select query but have the
query only show dates that are greater than the date
selected in cmbStartDate.

Any help would be appreciated.

Thanks,
Rohit Thomas
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top