L
lee
hi all,
i am trying to pull data from a table with the date of a
field within a specific month.
i want the user to enter the month in MM format, then
alter the SQL string to pull from the required table.
ie,
strSQL = "SELECT * FROM TableName WHERE DateSubmitted >='"
& strmonthstart & "' and datesubmitted <'" & strmonthend
& "'"
strmonthstart is inputted earlier as 01/MM/2003 (does this
have to be american format?)eg, 01/07/2003
strmonthend is calculated from strmonthstart as + 1 month,
eg 01/08/2003
if i haven't made any sense, please let me know. any help
is appreciated greatly. i've no hair left!!!
is the SQL syntax correct? is there an easier way for a
user to select the month to pull records from?
i am trying to pull data from a table with the date of a
field within a specific month.
i want the user to enter the month in MM format, then
alter the SQL string to pull from the required table.
ie,
strSQL = "SELECT * FROM TableName WHERE DateSubmitted >='"
& strmonthstart & "' and datesubmitted <'" & strmonthend
& "'"
strmonthstart is inputted earlier as 01/MM/2003 (does this
have to be american format?)eg, 01/07/2003
strmonthend is calculated from strmonthstart as + 1 month,
eg 01/08/2003
if i haven't made any sense, please let me know. any help
is appreciated greatly. i've no hair left!!!
is the SQL syntax correct? is there an easier way for a
user to select the month to pull records from?