Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Red face Unanswered: Linking object to filtered form (Thread originally links on a report)

    Does anyone know whether you can add hyperlinks to an Access report?

    Is it possible?

    If so please advise how to do this


    Many thanks

    Gareth
    Last edited by garethdart; 11-21-02 at 06:08.

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Any ideas

    Looks like this can't be done then????

  3. #3
    Join Date
    Nov 2002
    Posts
    4

    Click the Icon!

    There is a hyperlink icon you can click (looks the same as in Word, a globe with a chain-link), or you can click Insert then select "Hyperlink" or you can click ctrl + k

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Further assistance required!

    Yes...I've noticed that....

    However, not sure if it does exaclty what I want it to do...

    Have a look at the example .gif report i have attatched.

    Basically the report generates a planner style report based on project information within the database > Project number, name and associated
    dates i.e. start and end dates.

    The report then generates a calender style format based on a dialogue form which the users criteria is selected > i.e. if they want to see graphically what projects are in a particular month.

    When the report is generated, I have written the code to place and size each item on the report depending on the dates etc and the report shows the information as I require it.

    What I am investigating now is whether I can then allow the user to click on a particular project and then be taken to either another report or form within the database.

    The hyperlink function you suggest looks like it MAY do the trick, although I want it to function in report preview mode.

    I am using Access 2000 and when I generate one of these reports, the mouse is in "Zoom" view. Although I have added one of these hyperlinks as a test, it doesn't link to anything as when you try and click on it you just zoom in.

    Either I am losing the plot and there is a simple reason for this or perhaps what I am trying to do requires a different approach?

    Any suggestions greatfully received.
    Attached Thumbnails Attached Thumbnails report.gif  

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Unhappy Nasty feeling

    ...that the hyperlinks function only works if you then export the report as a HTML doccument.

    However, this will not give me the functionality I require - i.e. The report is showing dynamic information.

    I don't want to have to generate the report then export it every time as a new HTML doccument. Furthermore, the HTML doccument it exports loses all the colour (which is basically the report Key i.e. job status etc) and the borders around fields etc.

    Anyone have any other suggestions?

  6. #6
    Join Date
    Nov 2002
    Posts
    4
    If you click the Microsoft Word Icon "W", it will export the report to an .rtf file. Then you can click the link and it will open whatever you linked it to (form within the database, report within the database, web address, anything)

  7. #7
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33
    You can open URLs in defaut browser using ShellExecute.
    Detailed article is here http://support.microsoft.com/default...;en-us;Q148632

    Originally posted by j_jewell
    If you click the Microsoft Word Icon "W", it will export the report to an .rtf file. Then you can click the link and it will open whatever you linked it to (form within the database, report within the database, web address, anything)

  8. #8
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Ideas

    Thanks for the suggestions...

    Publishing via word...Loses some of the formatting of the report

    i.e. Colour of the "bars" (which is coloured dynamically when the report runs depending on the status of a field in the database) and also the report takes up several pages in word rather than 1 page within the report. (However, the links back to items in the database do work in this suggestion)

    Using ShellExecute - not sure how this can help me as your suggestion seems to rely on using a form rather than a report.

    The reason I have used a report for the layout is that I can size and place each element in the report based on fields in the database i.e the duration of a project means the bars are x days wide etc. If there was a way I could do this on a FORM, then I think my problem would be solved - but I think I'm right in saying I can't get the same sort of output using a FORM???

  9. #9
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Red face Still looking for inspiration

    As mentioned previously, the report I have written sizes places each element within the detail format event of the report...this enables me to place the items in the right location on the report to give the effect of a planner, almost like an MS Project gantt chart...

    The report is great...However, I have had a request to see if this report can become interactive i.e. when someone clicks on a project, they are taken to say a detail form with further information on that project.

    I don't think that this can be done in a "report" as investigated within this thread...

    Other suggestions welcome...

    i.e. Is there a way I could size elements on a continuous form seperately so that I could create the same layout I have in my report on a form (therefore allowing me to add buttons to link to elements within the current database)

    Any other suggestions?
    i.e. Rather than using Access, perhaps there is another way I can create a "graphical" interface linked to the data using other technologies?

    Any suggestions (however bizzare or complex!) greatfully received

    GD

  10. #10
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33

    Re: Still looking for inspiration

    Good news are that you can manipulate objects on the form from code using e.g.
    Me![SomeControl].Height = SomeCalculatedValue

    Bad news are that attempting to do that will change appearance of EVERY control of the same name on continuous forms

    You need completely different approach.
    I will give it a though in a week or so (finishing current project) if you will not come up something. If you do - please post here.
    HTH

  11. #11
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Red face Forms

    Thought that was the case Alex.

    Thanks for your remark.

    Greatful for any future suggestions, IF and when I can find a solution it will be posted here for future reference.

    GD

  12. #12
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Unhappy Any ideas folks?

    Can anyone think of a solution or strategy to achieve this sort of interactive report, whether it be an access based solution or using another method???

    I'm open to suggestions!

    GD

  13. #13
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Red face Never give in...

    OK so how about this idea...

    Slightly different data but same priniple...

    I've persevered with access for a bit and can generate the information
    on a FORM rather than a report....

    Basically this form is showing information on tasks people have been assigned to on a given date - 1 weeks worth of data AM and PM
    for each person

    For each person, the form genrates a label with thier name and then
    shows assigned tasks.

    Each label on the form is generated automatically and named
    according to the employeedid & task number
    ######
    Private Sub cmdManPlannerForm_Click()

    DoCmd.OpenForm ("frmtest"), acDesign

    Dim rst As ADODB.Recordset

    Set rst = New ADODB.Recordset

    rst.ActiveConnection = CurrentProject.Connection

    rst.Open "SELECT * from tblAssignedwork"
    'get the recordset

    Dim NumberOfBars As Integer ' Count of bars drawn used in testing
    Dim textbar As Control ' These will be the bars
    Dim VerticalPosition As Integer ' Vertical position of bar on form
    Dim currentemployee As Integer ' Used in testing
    Dim lastemployee As Integer 'Used in testing
    Dim horizontalposition As Integer 'Horizontal position of bar will be scaled to day
    Dim Daysize As Integer ' Day size in twips

    VerticalPosition = 0 ' vertical position of bar i.e. incremented for next person
    NumberOfBars = 0
    Daysize = 1200
    If Not rst.EOF Then
    lastemployee = 0
    currentemployee = 0
    End If


    Do Until rst.EOF

    currentemployee = rst![EmployeeID]

    If lastemployee <> currentemployee Then
    VerticalPosition = VerticalPosition + 600

    Set textbar = createcontrol("frmtest", acLabel, , "", "", , VerticalPosition, Daysize / 2, 500)
    With textbar
    .Caption = rst![EmpName]
    End With

    lastemployee = currentemployee
    End If



    Set textbar = createcontrol("frmtest", acLabel, , "", "", , VerticalPosition, Daysize / 2, 500)

    horizontalposition = Day(rst![DATE]) * Daysize

    If rst![when] = "pm" Then
    horizontalposition = horizontalposition + (Daysize / 2)
    'If it is a PM task then move it across 1/2 a day
    End If

    With textbar
    .FontSize = 7
    .FontName = "arial"
    .Caption = rst![Activity]
    .Name = rst![EmpName] & "Task" & NumberOfBars
    .BackStyle = 1
    .BackColor = rst![TASKBARCOL]
    .ForeColor = 16777215
    .HyperlinkSubAddress = "Form frmAssignmentsMAINForm"
    .Left = horizontalposition
    .BorderStyle = 1
    .Top = VerticalPosition
    End With

    NumberOfBars = NumberOfBars + 1 'count number bars
    rst.MoveNext

    'Go to next record

    Loop

    '[MsgBox "Number of bars was:" & [NumberOfBars] '(Used in testing)

    rst.Close
    Set rst = Nothing
    'clear recordset

    DoCmd.OpenForm ("frmtest"), acNormal


    End Sub
    ######

    Is the code behind the click event of the button on the dialogue form
    that requests the report

    This works great and I can set the .hyperlinksubaddress value of each label to open frmAssignmentsMAINForm which is the form that assigns people to tasks...

    What I need to be able to do though is automatically filter this form
    based on the particular label that has been clicked or perhaps even
    just filter for the person who's taks have been clicked

    Im not sure if this can be done in access???

    If not can I automatically assign code to the on click event of
    each label during the creation of the form...

    Any ideas folks?
    Attached Thumbnails Attached Thumbnails planner.gif  

  14. #14
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33

    Re: Never give in...

    Hi,
    I am working on solution to allows to "draw" different bars on subforms. I am sorry I am kinda tied up for the moment, but I am watching this thread closely.

    Hope to be of help before next week.

  15. #15
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33

    Re: Never give in...

    Hi Garethdart,
    I'v been able to come up with database that will display timelines on continuous forms, however these are of little help, since they are not clickable.
    I attach a screen shot, if you think that can be useful, I can mal you database itself.

    Concerning your code: to locate specific record you can use e.g.
    rs.FindFirst
    I am sorry for being breif, have to rush to work, I hope to get back to you with details tomorrow or the day after.
    Regards,
    Alec

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •