CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Date search fields?

Print topic Send  topic

Author Message
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 & "#")

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.