B
BRC
Cans someone tell me whats wrong with this code?
****************
Private Sub ItemName_AfterUpdate()
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "itemname = " & Me!ItemName
MsgBox (strFilter)
' Look up product's unit price and assign it to UnitPrice control.
Me!subclass = DLookup("subclass", "Parts", strFilter)
end sub
*******************
the message box displays the correct itemname but the dlookup is
causing error 2001. I beleive it has to do with the use of
"strfilter" in the criteria of the dlookup. I took this from the
orders form in Northwind sample database. thaks for any suggestions.
****************
Private Sub ItemName_AfterUpdate()
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "itemname = " & Me!ItemName
MsgBox (strFilter)
' Look up product's unit price and assign it to UnitPrice control.
Me!subclass = DLookup("subclass", "Parts", strFilter)
end sub
*******************
the message box displays the correct itemname but the dlookup is
causing error 2001. I beleive it has to do with the use of
"strfilter" in the criteria of the dlookup. I took this from the
orders form in Northwind sample database. thaks for any suggestions.