Results 1 to 13 of 13
  1. #1
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    95

    How to populate text box based on active main form's record, independently of report's source query


    Hi Guys, hope you are well.

    Can someone help me, I need to populate three text boxes based on active main form's record, independently of report's source query (picture and DB in Zip below):

    Click image for larger version. 

Name:	Forum05.jpg 
Views:	13 
Size:	199.5 KB 
ID:	45703
    WWV_Calculations_10.07.2021-Forum01.zip

    Thank you so much.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Bring the data in to the report source.?

    I have not used DLookUp() in Reports
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    95
    Hi.. Thanks for replying.. Yeah, I need to use DLOOKUP but haven't managed to do it myself.. Hm..

  4. #4
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    95
    Tried to use

    =DLookUp([Equipment_Typ];[tbl_Arbeitspaket];"Arbeitspaket=" & [Reports]![report_Kalkulationen]![Text39])

    no success

  5. #5
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    95
    I have tried like this:
    https://www.youtube.com/watch?v=2Kq3jZ73PGQ

    so on mz database it should be something like this:

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Perhaps:
    =DLookUp([Equipment_Typ];[tbl_Arbeitspaket];"Arbeitspaket = '" & [Reports]![report_Kalkulationen]![Text39] & "'")
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2016
    Posts
    95
    Hi Mr Fitz.. It gives me an error.. hm

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    And the error is ???
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi Vaz

    Would it not be easier to display the Report as shown in the attached?
    Attached Thumbnails Attached Thumbnails Report.JPG  
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  10. #10
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2016
    Posts
    95
    Sorry.. Yeah, when print previewing the report, Error is in form of asking for parameter value, twice, for Equipment_Typ and tbl_Arbeitspaket as well..

  11. #11
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2016
    Posts
    95
    Hi Mike, I have tried to make it exactly like that but with no success

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    See the attached

    Use the Command button in the Header of your Form to Preview the Report.
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  13. #13
    vazdajic is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2016
    Posts
    95
    Thanks Mike, perfect indeed. Couldn't make it myself. 5h trying.. Thank you.

    Quote Originally Posted by mike60smart View Post
    See the attached

    Use the Command button in the Header of your Form to Preview the Report.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 05-03-2020, 11:08 AM
  2. Replies: 14
    Last Post: 12-29-2016, 12:34 AM
  3. Replies: 5
    Last Post: 09-19-2016, 02:28 PM
  4. Replies: 3
    Last Post: 02-16-2015, 08:28 AM
  5. Replies: 0
    Last Post: 06-23-2009, 03:01 PM

Tags for this Thread

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