S
sebastico
Hello
I'm working with Access 2003
In a form I have a button to display person names in a List Box, which is
working well. What I need is, if there are no records to show in the List Box
a MsgBox displays "No records in DB"
This is my code:
Private Sub CmdA_Click()
lsbAut.RowSource = "SELECT AuID, AutName FROM TAut WHERE Left(AutName, 1) =
'A';"
If DCount("AuID", "AutName", "Left(AutName, 1) = 'A'") = 0 Then
MsgBox "No records in DB"
End If
End Sub
The code works well without
If DCount("AuID", "AutName", "Left(AutName, 1) = 'A'") = 0 Then
MsgBox "No records in DB"
End If
How can I use the above code with the MsgBox?
In the same way I would like that when there are records in List Box vba
will displays the number of records found, something like XX Records in DB.
Your advice is highly appreciated
I'm working with Access 2003
In a form I have a button to display person names in a List Box, which is
working well. What I need is, if there are no records to show in the List Box
a MsgBox displays "No records in DB"
This is my code:
Private Sub CmdA_Click()
lsbAut.RowSource = "SELECT AuID, AutName FROM TAut WHERE Left(AutName, 1) =
'A';"
If DCount("AuID", "AutName", "Left(AutName, 1) = 'A'") = 0 Then
MsgBox "No records in DB"
End If
End Sub
The code works well without
If DCount("AuID", "AutName", "Left(AutName, 1) = 'A'") = 0 Then
MsgBox "No records in DB"
End If
How can I use the above code with the MsgBox?
In the same way I would like that when there are records in List Box vba
will displays the number of records found, something like XX Records in DB.
Your advice is highly appreciated