Check record apakah ada di master sebelum membuka transaction form
Public Function CheckRecord(table)
Dim oprs As ADODB.Recordset
Set oprs = New ADODB.Recordset
SQL = “select * from ” & table
oprs.Open SQL, DB, adOpenKeyset, adLockReadOnly
If oprs.RecordCount <> 0 Then
CheckRecord = True
Else
msg = “tidak ada Records pada ” & table
MsgBox msg
CheckRecord = False
End If
End Function
Tinggalkan komentar
Belum ada komentar.
Tinggalkan komentar