Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43

    Select a field in a row and display data


    I have a report that contains a list of tenants and their reference numbers and booking information. Is there a way of clicking on a reference number and it displaying a new report or form containing any information related to that particular reference number.

    Also I would like the same kind of thing in relation to email addresses. I would like to be able to click on an email address and it open Microsoft outlook and it display the email address in the "To:" field.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Is this what you're after?

    http://www.baldyweb.com/wherecondition.htm

    You can use SendObject for the email.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    Quote Originally Posted by pbaldy View Post
    Is this what you're after?

    http://www.baldyweb.com/wherecondition.htm

    You can use SendObject for the email.
    I think this is exactly what I am looking for but I am finding it difficult to understand. If I send you a dummy version of my database would you be able to give me a working example?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can post it here, but it's pretty simple. You just have to replace the 3 names with yours.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    Find attached a dummy version of my database.

    If you open the 'Active Landlords' report you will see the first column is the Landlord Reference numbers. I would like to be able to click on an individual record and it open up a report or form with the properties that are associated with that particular landlord reference.

    If you are able to show me a working example of this, i think this will help me to have a better understanding of it.

    Thanking you for taking your time to help me with this.
    Attached Files Attached Files

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Open which report or form? It would look like:

    DoCmd.OpenForm "Landlord Details", , , "[Landlord Ref] = '" & Me.Landlord_Ref & "'"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    I tried this but it came back with an error message.

    I want it to open up a new report with just that information in it.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Well, I tested that in the double click event of the field in your report and it worked correctly. No knowing exactly what you tried, or what the error message you got was, I can't say what might be wrong.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    Can you send me the database back with what you did? Maybe I can see where I went wrong?

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Here you go.
    Attached Files Attached Files
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    I have tried to do the same as what you have done but have replaced the name of form to open. I keep getting this error message

    Click image for larger version. 

Name:	Untitled-1.gif 
Views:	4 
Size:	12.7 KB 
ID:	6729

    I have attached my database, if you could please let me know what I have done wrong. The Report is Active Landlords, and I want to be able to click on the Reference number and the the form 'Find Landlord_Properties' should open with the landlord details I selected displayed.
    Attached Files Attached Files

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'm on an iPad right now so can't look at th db. Is the code in the properties window or the code editor where it should be?

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    Yes I have it in the dbl click section.

    Click image for larger version. 

Name:	Untitled-2.gif 
Views:	4 
Size:	14.9 KB 
ID:	6734

  14. #14
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    It's that SQL above. Delete it or comment it out:

    'SELECT Surname
    'FROM Active_Landlords
    'ORDER BY Surname))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  15. #15
    Darkladymelz is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    43
    AH!! YES!!! I deleted it.

    Thank you so much for your help.

    How would I use this code to open Microsoft Outlook if I click on an e-mail address? Is there something different I have to write?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-22-2012, 06:05 PM
  2. Replies: 15
    Last Post: 07-05-2011, 02:28 PM
  3. Report control of a field display/no display
    By systems013 in forum Reports
    Replies: 5
    Last Post: 02-01-2010, 09:44 AM
  4. Field Select
    By RaptureReady in forum Forms
    Replies: 1
    Last Post: 01-28-2010, 08:29 PM
  5. Replies: 1
    Last Post: 03-02-2006, 06:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums