B
bill
The following piece of code is generating a "Type
Mismatch" error. What I'm not sure about is using
an "And" statement within the DLookup function (next to
last line). Does anyone see a problem here?
Dim strBeg As String, strMiddle As String, strEnd As
String, strFull As String, strOrder As String
strOrder = "[ORDER_NUMBER]=" & Me!OriginalInvoice
strBeg = "B"
strMiddle = Me!ItemCode
If Me!Size = "XL" Then
strEnd = "6"
End If
If Me!Size = "2XL" Then
strEnd = "7"
End If
If Me!Size = "3XL" Then
strEnd = "8"
End If
strFull = "[ITEM_NUMBER]='" & strBeg & strMiddle &
strEnd & "'"
Me!Price = DLookup("PRICE", "dbRDER_DETAIL",
strOrder And strFull)
End Sub
Mismatch" error. What I'm not sure about is using
an "And" statement within the DLookup function (next to
last line). Does anyone see a problem here?
Dim strBeg As String, strMiddle As String, strEnd As
String, strFull As String, strOrder As String
strOrder = "[ORDER_NUMBER]=" & Me!OriginalInvoice
strBeg = "B"
strMiddle = Me!ItemCode
If Me!Size = "XL" Then
strEnd = "6"
End If
If Me!Size = "2XL" Then
strEnd = "7"
End If
If Me!Size = "3XL" Then
strEnd = "8"
End If
strFull = "[ITEM_NUMBER]='" & strBeg & strMiddle &
strEnd & "'"
Me!Price = DLookup("PRICE", "dbRDER_DETAIL",
strOrder And strFull)
End Sub