Esempio di un check in una maschera continua

Di piĆ¹
4 Anni 9 Mesi fa #684 da fabioM1
fabioM1 ha creato la discussione Esempio di un check in una maschera continua
Public Sub cmd_controllo_barcode_click()

Dim stDocName As String
Dim stLinkCriteria As String
Dim DBCorrente As DAO.Database
Dim Tabella As DAO.Recordset

check_barcode = 0


Set rst = Me.Recordset
Me.Recordset.MoveFirst
Set DBCorrente = CurrentDb

Do While Not rst.EOF

Set Tabella = DBCorrente.OpenRecordset("SELECT lavorazioni_dett_mp.barcode, lavorazioni_dett_mp.cod_lavorazione FROM lavorazioni_dett_mp where lavorazioni_dett_mp.barcode ='" & Me.barcode & "'", dbOpenDynaset)
If Tabella.RecordCount = 0 Then 'checks for number of records
'MsgBox " ****** BARCODE PRENSENTE IN ALTRE LAVORAZIONI *******", vbInformation, "ATTENZIONE"

Else
MsgBox " ****** BARCODE " & Me.barcode & " PRENSENTE IN ALTRE LAVORAZIONI ******* CODICE LAV." & Tabella.Fields("cod_lavorazione"), vbInformation, "ATTENZIONE"
check_barcode = 1
End If

If IsNull(Me.tg1) Or IsNull(Me.n_nastri1) Then
check_barcode = 1
MsgBox ("DATI MANCANTI IN FORMAZIONI DI TAGLIO")
End If



Me.Recordset.MoveNext
Loop


End Sub

Si prega Accedi a partecipare alla conversazione.

Tempo creazione pagina: 0.108 secondi
Powered by Forum Kunena