installer69
Programmer
Another question:
I have a combo box that populates with serial numbers based on a query. It goes through a Me.refresh before the next one can be input. When a duplicate entry is attempted it triggers the notinlist error. You click ok but then you have to delete the shown data before trying again. As we use a barcode scanner is there any way of setting it so that the incorrect entry is highlighted and ready to be typed over? Thanks
I have used the following:
If DLookup("serial", "duplicate_query", "serial ='" & Me.Serial & "'") = Serial Then
MsgBox "This box is already scanned to us"
Cancel = True
Me.Serial.SelStart = 0
Me.Serial.SelLength = Len(Me.Serial)
Else
End If
to do a similar thing on another form but in this case I have no query to refer to just the notinlist function
I have a combo box that populates with serial numbers based on a query. It goes through a Me.refresh before the next one can be input. When a duplicate entry is attempted it triggers the notinlist error. You click ok but then you have to delete the shown data before trying again. As we use a barcode scanner is there any way of setting it so that the incorrect entry is highlighted and ready to be typed over? Thanks
I have used the following:
If DLookup("serial", "duplicate_query", "serial ='" & Me.Serial & "'") = Serial Then
MsgBox "This box is already scanned to us"
Cancel = True
Me.Serial.SelStart = 0
Me.Serial.SelLength = Len(Me.Serial)
Else
End If
to do a similar thing on another form but in this case I have no query to refer to just the notinlist function