The following VBA code searches for the serial number of an item in flat-file table. What I need is to modify the code so that if a match is found for the serial number the message box will show the information in the “description” column of the same record.
Table has columns as follows:
Item, Serial, Model, description, location,
Private Sub Serial_LostFocus()
If IsNull(DLookup("[Serial]", "StolenProperty", "[serial]='" & Me![Serial] & "'")) = False Then
MsgBox "This serial number matches a number already in the system", vbOKOnly, ("GDB2000se")
End If
End Sub
Table has columns as follows:
Item, Serial, Model, description, location,
Private Sub Serial_LostFocus()
If IsNull(DLookup("[Serial]", "StolenProperty", "[serial]='" & Me![Serial] & "'")) = False Then
MsgBox "This serial number matches a number already in the system", vbOKOnly, ("GDB2000se")
End If
End Sub