Best Error Trap

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

From: Norm Cook (normcookNOSPAM_at_cableone.net)
Date: 10/06/04

  • Next message: Pawel Durys: "Re: Best Error Trap"
    Date: Wed, 6 Oct 2004 10:47:19 -0500
    
    

    Is there a standard method to check the results of a VB query?
    For example
    Set RS = DB.OpenRecordSet(SqlQuery)

    I've tried
    If Not RS Is Nothing
      'doesn't seem to work-returns a RS object but I guess RecordCount is zero?

    On Error Resume Next
    RS.MoveLast
    If RS.RecordCount = 0 '

    Can't seem to get my head around this.


  • Next message: Pawel Durys: "Re: Best Error Trap"

    Relevant Pages

    • Re: Conditional printing of records in the detail section of a rep
      ... I got sick, still sick, so I'm putting this on hold for the moment. ... In query design, type an expression like ... sums the numbers from approximately 35 numerical fields ... The default data is zero. ...
      (microsoft.public.access.reports)
    • Re: Conditional printing of records in the detail section of a rep
      ... The query option, as outlined in your post, doesn't work. ... The default data is zero. ... commands used in the Event Procedure? ... unbound form with a command button to open the report filtered, ...
      (microsoft.public.access.reports)
    • Re: Does DateDiff Have A Bug
      ... a calculated field in a query is the way to go here. ... But here's why I added the DaysRemaining ... I'm trying to write the result of lngDays when it reaches zero days ...
      (microsoft.public.access.formscoding)
    • Re: Sum Expression gives 1.45519152283669E-11 instead of 0 (zero)
      ... So, I gather, any time I want to omit zero records in query, I'll have to ... where TransactionQuantity and CreditDebit are Integers while CurrentPrice ... AssetHolding: ...
      (microsoft.public.access.queries)
    • Re: Does DateDiff Have A Bug
      ... a calculated field in a query is the way to go here. ... But here's why I added the DaysRemaining ... I'm trying to write the result of lngDays when it reaches zero days ...
      (microsoft.public.access.formscoding)