Hi everyone,
I have a SQL Select statement I am trying to write to pull some records from a table. I pretty much have no trouble until I get to the WHERE clause. I have fields ID, Issue, Resolution, and DateTimeAdded. I want to pull records that are incomplete less than 6 days old. I have the following function that I have written to subtract 6 days from today's date.
I have this coding in my Visual Basic Form:
Me.txtDate.Text = Cstr(DateAdd("d", -6, Today()))
I need to pass the Me.txtDate.txt variable to a Tsequel Statement which I am very green in.
I need to place the passed variable name into a Where Clause somehow. I know this much.
I was trying to write the TSEQUEl statement like this:
Select ID, Issue, Resolution, DateTimeAdded,
FROM CallIssueMain
WHERE User=UserName and DateTimeAdded Between txtDate and
Today.
The function has the date: 08/21/2009 based on 6 days from
todays date 08/27/2009. So the 08/21/2009 is passed to the
TSequel statement to pull records. But I do noy know how to write it correct to pull the records.
I need to pull records between 08/21/2009 and 08/27/2009 from the table. How can I write the Select statement to do this and have the right syntax. I know you have to break out the strings somehow to write it correctly so as to run.
any help is appreciated.
Dataman86
I have a SQL Select statement I am trying to write to pull some records from a table. I pretty much have no trouble until I get to the WHERE clause. I have fields ID, Issue, Resolution, and DateTimeAdded. I want to pull records that are incomplete less than 6 days old. I have the following function that I have written to subtract 6 days from today's date.
I have this coding in my Visual Basic Form:
Me.txtDate.Text = Cstr(DateAdd("d", -6, Today()))
I need to pass the Me.txtDate.txt variable to a Tsequel Statement which I am very green in.
I need to place the passed variable name into a Where Clause somehow. I know this much.
I was trying to write the TSEQUEl statement like this:
Select ID, Issue, Resolution, DateTimeAdded,
FROM CallIssueMain
WHERE User=UserName and DateTimeAdded Between txtDate and
Today.
The function has the date: 08/21/2009 based on 6 days from
todays date 08/27/2009. So the 08/21/2009 is passed to the
TSequel statement to pull records. But I do noy know how to write it correct to pull the records.
I need to pull records between 08/21/2009 and 08/27/2009 from the table. How can I write the Select statement to do this and have the right syntax. I know you have to break out the strings somehow to write it correctly so as to run.
any help is appreciated.
Dataman86