Unwanted Hyperlinks in Report

G

Guest

I have a report that when it is exported to html, the labels display as hyperlinks. I have not set the Hyperlink property on these. The only unusual thing I am doing is setting their caption at runtime in the Report.Open event.

The hypelink address is sort of like a file path mixed with an SQL statement.

Example: file:///C:/My%20Documents/<BR>SELECT%20Q_LAST_SIGHTING_CUSTOM_3.DESTINATION,%

I can't see any more of the select statement. Why would this be happening?

Thanks for the help. Below is all of the code that sets the rowsource and controlsource properties in the Report.Open event.





' Create string that has the day variables for the next two weeks;
' this is to be included in the SQL statement to fix the columns
' that display.

strDays = "'" & Format(DATE, "ddd mm/dd") & "','" & Format(DATE + 1, "ddd mm/dd") & "','" & Format(DATE + 2, "ddd mm/dd") & "','" & Format(DATE + 3, "ddd mm/dd") & "','" & Format(DATE + 4, "ddd mm/dd") & "','" & Format(DATE + 5, "ddd mm/dd") & "','" & Format(DATE + 6, "ddd mm/dd") & "','" & Format(DATE + 7, "ddd mm/dd") & "','" & _
Format(DATE + 8, "ddd mm/dd") & "','" & Format(DATE + 9, "ddd mm/dd") & "','" & Format(DATE + 10, "ddd mm/dd") & "','" & Format(DATE + 11, "ddd mm/dd") & "','" & Format(DATE + 12, "ddd mm/dd") & "','" & Format(DATE + 13, "ddd mm/dd") & "'"

' SQL statement for cross tab query
strSQL = "TRANSFORM Count(Q_ETA_CALENDAR_CUSTOM_1.Railcar) AS CountOfRailcar " _
& "SELECT IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]) AS Destination, Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "From Q_ETA_CALENDAR_CUSTOM_1 " _
& "GROUP BY IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]), Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "PIVOT Format(IIf(IsNull([ETADateAlias]),Null,IIf([ETADateAlias]>Date(),[ETADateAlias],Date())),'ddd mm/dd') In (" & strDays & ");"

' Set the report record source to the sql statement
Me.RecordSource = strSQL

' Set the control source for each column field and label for the
' next 14 days
Me.txtDay1.ControlSource = Format(DATE, "ddd mm/dd")
Me.lblDay1.Caption = Format(DATE, "mm/dd")
Me.lblWeekDay1.Caption = Format(DATE, "ddd")
Me.txtDay2.ControlSource = Format(DATE + 1, "ddd mm/dd")
Me.lblDay2.Caption = Format(DATE + 1, "mm/dd")
Me.lblWeekDay2.Caption = Format(DATE + 1, "ddd")
Me.txtDay3.ControlSource = Format(DATE + 2, "ddd mm/dd")
Me.lblDay3.Caption = Format(DATE + 2, "mm/dd")
Me.lblWeekDay3.Caption = Format(DATE, "ddd")
Me.txtDay4.ControlSource = Format(DATE + 3, "ddd mm/dd")
Me.lblDay4.Caption = Format(DATE + 3, "mm/dd")
Me.lblWeekDay4.Caption = Format(DATE + 3, "ddd")
Me.txtDay5.ControlSource = Format(DATE + 4, "ddd mm/dd")
Me.lblDay5.Caption = Format(DATE + 4, "mm/dd")
Me.lblWeekDay5.Caption = Format(DATE + 4, "ddd")
Me.txtDay6.ControlSource = Format(DATE + 5, "ddd mm/dd")
Me.lblDay6.Caption = Format(DATE + 5, "mm/dd")
Me.lblWeekDay6.Caption = Format(DATE + 5, "ddd")
Me.txtDay7.ControlSource = Format(DATE + 6, "ddd mm/dd")
Me.lblDay7.Caption = Format(DATE + 6, "mm/dd")
Me.lblWeekDay7.Caption = Format(DATE + 6, "ddd")
Me.txtDay8.ControlSource = Format(DATE + 7, "ddd mm/dd")
Me.lblDay8.Caption = Format(DATE + 7, "mm/dd")
Me.lblWeekDay8.Caption = Format(DATE + 7, "ddd")
Me.txtDay9.ControlSource = Format(DATE + 8, "ddd mm/dd")
Me.lblDay9.Caption = Format(DATE + 8, "mm/dd")
Me.lblWeekDay9.Caption = Format(DATE + 8, "ddd")
Me.txtDay10.ControlSource = Format(DATE + 9, "ddd mm/dd")
Me.lblDay10.Caption = Format(DATE + 9, "mm/dd")
Me.lblWeekDay10.Caption = Format(DATE + 9, "ddd")
Me.txtDay11.ControlSource = Format(DATE + 10, "ddd mm/dd")
Me.lblDay11.Caption = Format(DATE + 10, "mm/dd")
Me.lblWeekDay11.Caption = Format(DATE + 10, "ddd")
Me.txtDay12.ControlSource = Format(DATE + 11, "ddd mm/dd")
Me.lblDay12.Caption = Format(DATE + 11, "mm/dd")
Me.lblWeekDay12.Caption = Format(DATE + 11, "ddd")
Me.txtDay13.ControlSource = Format(DATE + 12, "ddd mm/dd")
Me.lblDay13.Caption = Format(DATE + 12, "mm/dd")
Me.lblWeekDay13.Caption = Format(DATE + 12, "ddd")
Me.txtDay14.ControlSource = Format(DATE + 13, "ddd mm/dd")
Me.lblDay14.Caption = Format(DATE + 13, "mm/dd")
Me.lblWeekDay14.Caption = Format(DATE + 13, "ddd")
 
M

Mingqing Cheng [MSFT]

Hi

From your descriptions, I understood that your Access could not export to
HTML successfully. Have I understood you? If there is anything I
misunderstood, please feel free to let me know:)

First of all, what's the version of Access you are using? I found there is
an known issue and relative resolution for it. See the following KB

ACC2000: Saving a Report to Different Format Reverts to First Instance of
Report
http://support.microsoft.com/?id=248898

Secondly, if the method above could not hit your scenario, it is highly
appreciated if you could provide me a small sample file, with which I could
reproduce it on my machine. I could be reached at
(e-mail address removed) (please remove online as it is prepared for
SPAM:)

Thank you for your patience and cooperation. If you have any questions or
concerns, don't

hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng

Microsoft Developer Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top