teriwinkle
Technical User
I have been struggling with the following problem. I have a table of forecasted parts (tblForecast), separate from my partnumber table (PartNumbers). When I add a partnumber to a form in my database, I want to be able to check to see if it is in the forecasted parts table automatically. If it is, I want a check box on the form to be checked. I have tried the following, but it is not working for me. Am I approaching this correctly? Can anyone think of a better way? Thanks for your help! ___________________________________________--
Dim Forecasted As Boolean
If DLookup("[PartNo]", "tblForecastParts", "[PartNo] = Forms![PartNumbers]![PartNo]" Then _
Forecasted = "Yes"
End If
Dim Forecasted As Boolean
If DLookup("[PartNo]", "tblForecastParts", "[PartNo] = Forms![PartNumbers]![PartNo]" Then _
Forecasted = "Yes"
End If