Skip to main content
Participating Frequently
January 18, 2007
Answered

passing date criteria in url parameter

  • January 18, 2007
  • 2 replies
  • 304 views
Hi,

I want to filter a recordset by a given date.
Create the recordset, if I use a runtime value of #27/11/06# all the records for that date are returned.
However, when I try to pass the same information through an URL Parameter it doesn't work.

Is there a problem with passing this info in that way?

Thanks, Mark.
This topic has been closed for replies.
Correct answer Newsgroup_User
No, should be absoloutely fine. The prob is most likely to do with your SQL
statement.

As a test, don't display any records. At the top of your page, try
outputting the completed SQL statement onto the page to see what it looks
like. The problem being you may need to add the # symbols manually. Should
look something like

"SELECT * FROM TableName WHERE DateField = #" & URLParameter & "#"

HTH,

Piers


2 replies

Participating Frequently
January 18, 2007
that worked first time

i had a hunch it was those pesky #'s but i'm a touch slow

thanks a million

mark
Newsgroup_UserCorrect answer
Inspiring
January 18, 2007
No, should be absoloutely fine. The prob is most likely to do with your SQL
statement.

As a test, don't display any records. At the top of your page, try
outputting the completed SQL statement onto the page to see what it looks
like. The problem being you may need to add the # symbols manually. Should
look something like

"SELECT * FROM TableName WHERE DateField = #" & URLParameter & "#"

HTH,

Piers