I have the following code:
Can the date of 20140421 be replaced with a variable of some kind so that it will input whatever is put into that field? For example, the input box is labeled as frmStartDate, so how would I get it to work like
AND OptionsValues.CurrentDate >= 'frmStartDate'
so that whatever date is put in there will take the place of the original date in the following
AND OptionsValues.CurrentDate >= '20140421'
Any help is appreciated!
Enkrypted
A+
Code:
SELECT OptionsValues.AgentAssisted,
OptionsValues.CurrentDate,
OptionsValues.Duration
FROM OptionsValues
WHERE OptionsValues.Cable Is Not Null
-- Bigger or equal of startdate
AND OptionsValues.CurrentDate >= '20140421'
-- Smaller than your end date + 1 day. That way you will get right result if you have time in your datetime fields.
AND OptionsValues.CurrentDate < '20140423'
ORDER BY OptionsValues.AgentAssisted;
Can the date of 20140421 be replaced with a variable of some kind so that it will input whatever is put into that field? For example, the input box is labeled as frmStartDate, so how would I get it to work like
AND OptionsValues.CurrentDate >= 'frmStartDate'
so that whatever date is put in there will take the place of the original date in the following
AND OptionsValues.CurrentDate >= '20140421'
Any help is appreciated!
Enkrypted
A+