Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink Formula

Status
Not open for further replies.

ghesse

Programmer
Jun 16, 2003
51
US
Hello,

I'm having a problem with making a hyperlink formula. I have types of int and datetime that I'm trying to plug into the querystring. My ints end up looking like #,###.## and my datetimes have spaces in them like MM/DD/YYYY HH:MM:SS How do I convert these db fields in the formula so the ints look like -# and the datetimes look like mm/dd/yyyy. THis is my formula so far:
"//localhost/devreports/webform3.aspx?alertid=" + CStr({rpt_AlertReadRate;1.alertid}) + "&afid=" + CStr({?@affiliation}) + "&sd=" + CStr({?@startdate}) + "&ed=" + CStr({?@enddate})

Thanks,
ghesse
 
Hey ghesse,

You want to replace all your CStr references with formatted ToText. I imagine your final result looking more like this:

"//localhost/devreports/webform3.aspx?alertid=" + ToText({rpt_AlertReadRate;1.alertid},0,"") + "&afid=" + ToText({?@affiliation},0,"") + "&sd=" + ToText({?@startdate},"MM/dd/yyyy") + "&ed=" + ToText({?@enddate},"MM/dd/yyyy")

Naith
 
Gheese,

Change :
"//localhost/devreports/webform3.aspx?alertid=" + CStr({rpt_AlertReadRate;1.alertid}) + "&afid=" + CStr({?@affiliation}) + "&sd=" + CStr({?@startdate}) + "&ed=" + CStr({?@enddate})

To:
"//localhost/devreports/webform3.aspx?alertid=" & ToText({rpt_AlertReadRate;1.alertid},0,"") & "&afid=" & ToText({?@affiliation},0,"") & "&sd=" & ToText({?@startdate},"MM/dd/yyyy") & "&ed=" & ToText({?@enddate},"MM/dd/yyyy")

Let me know how you get on.....


Reebo
Scotland (Sunny with a Smile)
 
Naith...You beat me to it mate!

I thought I was the only person who logged in to Tek-Tips as soon as they came to work......

Reebo
Scotland (Sunny with a Smile)
 
You've only just got in? I'm on my lunchbreak already. ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top