Drives me completely out of my skull..
I have a dropdown box with two values in it on my form
I have to dlookup the ID from the listitems, but the table that holds them is not the recourdscource of the form.
Simple enough one might say but it will not give me the ID whatever i try..
This code returns the ID of one of the listitems :
Code:
Me.ctrlBuildingManagementID = DLookup("[BuildingManagementID]", "[tblBuildingManagement]", "[BuildingManagement] = 'ListItemNumber1'")
But i want the dlookup to return the value of the ID depending on the Building manager so i tryed this (and many, many other variants)
Code:
Me.ctrlBuildingManagementID = DLookup("BuildingManagementID", "tblBuildingManagement", "[BuildingManagement] = '" & Forms![frmObjecten]![kzlBuildingManagement] & "'")
kzlBuildingManagement is text and so is BuildingManagement in the table
Where am i going wrong here ?