New Record

Hustle1081

Registered User.
Local time
Today, 00:13
Joined
Jan 8, 2004
Messages
16
When I run a search and it brings up the results in a table how could I exclude the new record. My other problem is that when I run a new search and there are no records found I would like it to display an error message instead of just going to the one blank new record. If I eliminate the new record from showing up I think it might be easier to check for this error.
 
try setting the allow additions to false to get rid of the new line...

Try looking into the me.recordcount thing to try and work in an error message

Hope this will give you an idea on how to proceed
 
Thanks for your help does anyone else have any suggestions
 
The first part worked but could someone be more specific on how I could check for a blank record so that I can have an error message pop up.
 
I know I have replyed to myself twice now but Id like to draw attention back to my Question. When I am running a search and I get results in either a form or a table, when there are no matches for the search how do I go about checking for this. Once I do this I will have an error message stating no files matched the search. Anybody have any idea.
 
Hustle1081 said:
When I am running a search and I get results in either a form or a table, when there are no matches for the search how do I go about checking for this. Once I do this I will have an error message stating no files matched the search.


On a form - don't know where you'd want it though:

Code:
If [b]DCount([/b]"MyField", "MyQuery"[b])[/b] = 0 Then
    MsgBox "There are no records.", vbExclamation
    Exit Sub
End If
 
thanks alot ill try it out hopefully ill get it too work.
 

Users who are viewing this thread

Back
Top Bottom