Private Sub Part__Exit(Cancel As Integer)
Dim varPartDescription As Variant
varPartDescription = DLookup("PartDescription", "Inventory", "PartNumber = [Part]")
If (Not IsNull(varPartDescription)) Then Me![Description] = varPartDescription
End Sub
In the above code what I am tring to do is get the part desription to auto fill after the part number is entered.. what is happening is the part number is put in but the desription tha is being put in is the first description it comes to ( Record 1 ) when it should be using the one next tot he part Number.. any advice would be hel full
Dim varPartDescription As Variant
varPartDescription = DLookup("PartDescription", "Inventory", "PartNumber = [Part]")
If (Not IsNull(varPartDescription)) Then Me![Description] = varPartDescription
End Sub
In the above code what I am tring to do is get the part desription to auto fill after the part number is entered.. what is happening is the part number is put in but the desription tha is being put in is the first description it comes to ( Record 1 ) when it should be using the one next tot he part Number.. any advice would be hel full