prima vi invio il mio codice, scusate è molto contorto, ma anche se pare strano ragiono meglio con variabili dello stesso nome

codice:
Private Sub cmdNewMag_Click()
Dim Barre As String
Dim StringaSQL As String
Barre = InputBox("Inserire Codice a Barre", "Inserimento Codice a Barre")
Data1 = App.Path & "/DB.mdb"

StringaSQL = "SELECT " + "Barre" + " FROM Magazzino"
StringaSQL = StringaSQL + " WHERE " + "Barre"
StringaSQL = StringaSQL + " = '" + Barre + "'"
StringaSQL = StringaSQL + "ORDER BY " + "Barre"

Data1.RecordSource = StringaSQL
Data1.Refresh

If Data1.Recordset.RecordCount > 0 Then
    Data1.Recordset.MoveFirst
Do While Data1.Recordset.EOF
Loop
    If lblCerca.Caption = Barre Then
        MsgBox "OK"
    Else
        MsgBox "Assente"
    End If
End If
End Sub
il problema persiste nel seguente punto :
codice:
    If lblCerca.Caption = Barre Then
        MsgBox "OK"
    Else
        MsgBox "Assente"
    End If
praticamente se il codice a barre viene ritrovato nella lista allora risponde semplicemente con un del MsgBox "OK" in caso contrario non dice nulla, voi mi direte che ti frega tanto non è nel DB ma a me interessa xkè se il Codice a barre è presente dovrà essere modificato ( ovviamente inserirò il codice successivamente come avrete intuito ) se non esiste è un nuovo record ma se non rileva la NON presenza del record stesso direi che il programma in se mi dice

credo di essermi spiegato

TNX Anticipatamente