CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 link date parameter doesn't keep value

Print topic Send  topic

Author Message
Sharon Niles
Posted: 01/02/2004, 9:28 PM

Hi everyone and happy new year.

I have a page with four labels, no datasource:

Date1
PreviousMonth
NextMonth
HiddenField

The Date1 starts with the current date. When I click Previous Month, one month is subtracted from the Date1. When I click Next month, one month is added to Date1.

Date1 before show is:
If IsEmpty(Request.QueryString("Date1")) then
Date1.Value = now()
else
Date1.Value = Date1.Value
End if

PreviousMonth before show is:
PreviousMonth.value = dateadd("m",-1,date1.value)

NextMonth before show is:
NextMonth.value = dateadd("m",1,date1.value)

HiddenField is: hiddenfield.value = date1.value

PreviousMonth link is:
href is to same page
source type is expression
parameter source is: dateadd("m",-1,hiddenfield.value)
parameter name is: Date1

NextMonth link is:
href is to same page
source type is expression
parameter source is: dateadd("m",1,hiddenfield.value)
parameter name is: Date1

When I open the screen
Date1 = 1/2/2004
PreviousMonth = 12/2/2003
NextMonth = 2/2/2004
HiddenField = 1/2/2004

As soon as I click on either NextMonth or PreviousMonth, Date1 becomes 1/30/1900, PreviousMonth becomes 12/30/1898, NextMonth becomes 2/28/1900, HiddenField becomes 1/30/1900

Any help will be most appreciated. Thank you.

Sharon
Edd
Posted: 01/03/2004, 5:12 AM

Sharon,

Check the format of your dates in the project that they are consistent with the display field format. If it is correct what is the format of the date in the address line e.g. MM/DD/YYYY?


Edd
[www.syntech.com.au]

Sharon Niles
Posted: 01/03/2004, 9:33 PM

Thanks Ed,

I appreciate your help. Actually, Yes software answered my question.
I have to add this line:
next1.Page = "NewCal.asp?Date1=" & dateadd("m",1,date1.value)

to the before show and pass the link as a URL.

Sharon

   


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.