none
DLookup in a report doesn't work when put the report in a navigation form RRS feed

  • Question

  • Hello everyone,

    I am new to Access and I've attempted to use a DLookup as a control source in a report like this:

    =DLookUp("txtVehicleName","tblVehicle","VehicleID=" & [Reports]![rptMountingPosition]![Vehicle_FKID])

    It works well when I open the report direktly from the left navigation pane. But thing became weired when I creat a navigation form and put this report into it. It does not work any more, only shows a "#Name?" error message.

    Is there anyone could give me a hand?

    Thanks very much.

     
    Monday, June 24, 2019 9:40 AM

Answers

  • Does this work?

    DLookUp("txtVehicleName","tblVehicle","VehicleID=" & [Vehicle_FKID])


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by dzgr Monday, June 24, 2019 11:33 AM
    Monday, June 24, 2019 10:24 AM

All replies

  • Does this work?

    DLookUp("txtVehicleName","tblVehicle","VehicleID=" & [Vehicle_FKID])


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by dzgr Monday, June 24, 2019 11:33 AM
    Monday, June 24, 2019 10:24 AM
  • OMGGGGGGGGGGGGGGG, You saved my day, it works. I've tried also other solutions in the meantime like this:

    =DLookUp("txtVehicleName","tblVehicle","VehicleID= " & [Forms]![frmNavigation]![NavigationSubform]..[Form]![Vehicle_FKID])

    But it didn't work out. It's unbeliveble that the answer is so simple....


    Monday, June 24, 2019 11:36 AM