Dlookup return issues
I have been building a database for my team, but I ran into a simple issue which I just cannot resolve and i am hoping one of you experts here will be able to help me out. PLEASEEE..
I have a timecardinput table, costcode table and a timecardinput form. what i am trying to do is to make a timecardinput form, which updates the timecardinput table with costcode and its description.
User enters the costcode in the timecardInputForm but I want my form to autopopulate the description field, by using a dlookup on the costcode table. I have exausted all possible combinations but by dlookup only returns a 1, if the value is found and 0 otherwise.
not sure where I am going wrong, but any help is appreciated. i have watched dozens of youtube videos, and googled this with no help ;(
Once again thanks.
Public Sub CostCode_AfterUpdate()
WorkDescription = DCount("WorkDescription", "tblKEPCostCodes", "CostCode=" & CostCode)