Hello
Can somebody help me understand why the top line of code works OK but the second doesn't?
recID = DLookup("[ID]", "RECIPES", "RecipeName = 'chow mein'")
recID = DLookup("[ID]", "RECIPES", "RecipeName = '" & Me.txtRecipe & "')"
Where txtRecipe is a text box on the current form that's value is 'chow mein'
Can somebody help me understand why the top line of code works OK but the second doesn't?
recID = DLookup("[ID]", "RECIPES", "RecipeName = 'chow mein'")
recID = DLookup("[ID]", "RECIPES", "RecipeName = '" & Me.txtRecipe & "')"
Where txtRecipe is a text box on the current form that's value is 'chow mein'