Dim rst As DAO.Recordset
Dim bOK As Boolean
Dim i As Integer
Dim sInfo As String
bOK = True
If Nz(Me.txtaccno, "") = "" And Nz(Me.txtclientname, "") = "" Then
MsgBox "You must select a Trading Account Number or Client Name"
Exit Sub
End If
Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblcorp WHERE tradingaccno='" & Me.txtaccno & "' OR clientname='" & Me.txtclientname & "'")
If Not rst.EOF Then
rst.MoveLast
rst.MoveFirst
Do Until rst.EOF
If rst("memorandum").Value = False Then
Label56.Visible = True
bOK = False
End If
If rst("boardresolution").Value = False Then
Label57.Visible = True
bOK = False
End If
rst.MoveNext
Loop
Else
MsgBox "Account Number/Client Name not found", vbOKOnly
Exit Sub
End If
If bOK = True Then
MsgBox "Everything is complete for this Account."
End If
End Sub
|