E
EMILYTAN via AccessMonster.com
I want to display a message box when the subform loads and list all the part
numbers that the type is wrong.
This code, I put it in the subform however this can only display a part
number
Any idea?
Code :-
mySQL = "SELECT WIPRawDetails.PartNumber, W_Type FROM WIPRawDetails WHERE
WIPRawDetails.JobNumber= '" & Me.txtJobNumber & "'"
myrecset.Open mySQL
Do Until myrecset.EOF
strType = Nz(DLookup("WIPType", "Inventory", "PartNumber='" & txtPartNumber &
"'"))
If myrecset!W_Type <> strType Then
Debug.Print myrecset!PartNumber
PartNumber = PartNumber & "," & myrecset!PartNumber
EndIf
myrecset.MoveNext
Loop
myrecset.Close
If PartNumber <> "" Then
MsgBox "This is the list of PartNumber which the item is not match!" &
PartNumber
End If
numbers that the type is wrong.
This code, I put it in the subform however this can only display a part
number
Any idea?
Code :-
mySQL = "SELECT WIPRawDetails.PartNumber, W_Type FROM WIPRawDetails WHERE
WIPRawDetails.JobNumber= '" & Me.txtJobNumber & "'"
myrecset.Open mySQL
Do Until myrecset.EOF
strType = Nz(DLookup("WIPType", "Inventory", "PartNumber='" & txtPartNumber &
"'"))
If myrecset!W_Type <> strType Then
Debug.Print myrecset!PartNumber
PartNumber = PartNumber & "," & myrecset!PartNumber
EndIf
myrecset.MoveNext
Loop
myrecset.Close
If PartNumber <> "" Then
MsgBox "This is the list of PartNumber which the item is not match!" &
PartNumber
End If