And
|
Posted: 10/22/2003, 1:07 PM |
|
Hi,
I need some help. ASP + Access.
I have 1Search + 1Grid forms in one page. Search is for dates.
Search Fields: Start_Date and End_Date
Date field in Grid is Short Date ( 24/10/2002 ).
But Search object do not working.....
What type of fields i have to choose - date or? And what script i have to use for that situation. Can you shom me an example?
Regards
|
|
|
Alice
|
Posted: 10/22/2003, 1:48 PM |
|
This is in the OPEN event of the grid form, the one that the serach form will send it's parameters to.
ocSDate = GetParam("Prompt1") ;* the start date parameter
ocEdate = GetParam("Prompt2") ;* the end date param
sday = mid(ocsdate,1,2) ; convert all the start date stuff to use dd/mm/yyyy
smon= mid(ocsdate,4,2)
syear = mid(ocsdate,7,4)
eday = mid(ocedate,1,2) ; ; convert all the end date stuff to use dd/mm/yyyy
emon=mid(ocedate,4,2)
eyear=mid(ocedate,7,4)
' join 'em up in asp useable order
ocsdate = smon & "/" & sday & "/" & syear
ocedate = emon & "/" & eday & "/" & eyear
' convert to format ACCESS can understand
sWhere = Replace(sWhere,"'" & GetParam("Prompt1") & "'","#" & ocsdate & "#")
sWhere = Replace(sWhere,"'" & GetParam("Prompt2") & "'","#" & ocedate & "#")
|
|
|
|