No records returned by query

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Kenneth H. Young (young_at_ncst.nrl.navy.mil)
Date: 03/02/04


Date: Tue, 2 Mar 2004 11:03:01 -0500

I have a form with a query for a data source that returns mismatched data.

SELECT Arpwatch.IP, Arpwatch.Name, Arpwatch.[Mac Address], Arpwatch.[Last
Seen]
FROM Arpwatch LEFT JOIN [DHCP List] ON Arpwatch.IP = [DHCP List].[Client IP
Address]
WHERE ((([DHCP List].[Client IP Address]) Is Null));

When no records are returned the form opens and displays a blank page. I
have tried applying an 'On Load' event that if 'IP' is null to display a
msgbox that there is no data to display and then close the form. I have also
tried If Not IsNull then ... Else msgbox and then close. Nether of these
work. How can I handle this if no records are returned by the query?

Thank you for any assistance

Ken



Relevant Pages

  • Re: MsgBox How Meny records updated
    ... The example shows how to execute the query and display the RecordsAffected in the MsgBox. ... Allen Browne - Microsoft MVP. ...
    (microsoft.public.access.forms)
  • No Records
    ... I have a form with a query for a data source that returns mismatched data. ... msgbox that there is no data to display and then close the form. ... Else msgbox and then close. ...
    (microsoft.public.access.formscoding)
  • Re: No records returned by query
    ... See if the following code, in the form's Open event, will work for you: ... > msgbox that there is no data to display and then close the form. ... Else msgbox and then close. ... How can I handle this if no records are returned by the query? ...
    (microsoft.public.access.formscoding)
  • Re: DB Result Wizard Error
    ... Also noted that one folder, which contains no information can't be deleted, ... >> For instance Equipment Serial Number, Equipment Model Number, Cost Accounting ... >> to display the new equipment information. ... >> is in the table was added to the query. ...
    (microsoft.public.frontpage.programming)
  • RE: Just starting to design a form (or is it a query?)
    ... A Form is used to display the data and allow ... A query can be the record source for a form. ... that match an ID in the Assessment table. ... Now, assuming this is the case, what you need is a form with a sub form. ...
    (microsoft.public.access.gettingstarted)