Hi to All,
I have form Form1 with a command button cmdMemberName with the following VBA code:
Code:
Private Sub cmdMemberName_Click()
On Error GoTo ProcError
Dim strWHERE As String
If cboBookStatusId = 2 Then
strWHERE = "[fkBookId] = " & Forms!frmBooksUsers.txtpkBookId
DoCmd.OpenForm "frmNameOfMember", , , strWHERE, acFormReadOnly
Else
MsgBox "The selected book is not loaned"
End If
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description & ", " _
& vbCritical, "Error in cmdMemberName_Click Procedure..."
Resume ExitProc
End Sub
The second form frmNameOfMember will open completely blank if there is no record to display.
How can I have a message box informing the user that no records exist?
Thanks in advance
Khalil