I have tried many variations of this code but so far I only get the same #Error message. Here are the details:
On form "WOFilterandFluidsForm" I inserted a text box and named it "txtOilFilterType".
I am trying to find the value of field [OilFilterType] (text format) from table [AssetFFT] based on the value of field [AssetNo] (Number format) from the same table. So on my form when I choose a value from the drop down list of the bound control [AssetNo], I then was hoping it would find the value of the OilFilterType field in my text box.
My code that is in the Control Source of the text box currently looks like this:
But I only get an #Error message in the text box. I don't know if it's because I am trying to obtain a text value based on a numerical value or what.
I have also tried this code:
Again, same error message. Can anyone shed some light on this for me please?
On form "WOFilterandFluidsForm" I inserted a text box and named it "txtOilFilterType".
I am trying to find the value of field [OilFilterType] (text format) from table [AssetFFT] based on the value of field [AssetNo] (Number format) from the same table. So on my form when I choose a value from the drop down list of the bound control [AssetNo], I then was hoping it would find the value of the OilFilterType field in my text box.
My code that is in the Control Source of the text box currently looks like this:
Code:
=DLookUp("[OilFilterType]","[AssetFFT]","[AssetNo]=" & [AssetNo])
But I only get an #Error message in the text box. I don't know if it's because I am trying to obtain a text value based on a numerical value or what.
I have also tried this code:
Code:
=DLookUp("[OilFilterType]","[AssetFFT]","[AssetNo]=" & Forms!WOFilterandFluidsForm![AssetNo])
Again, same error message. Can anyone shed some light on this for me please?