Re: criteria error when running a report

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 01/03/05


Date: Sun, 02 Jan 2005 20:11:17 -0500

Try

IIF(IncheckDate Is Null,0,dhCountWorkdays(Date(),[InCheckDate]))

Which should return 0 if InCheckCate is "blank" or try

\
IIF(InCheckDate Is Null,Null,dhCountWorkdays(Date(),[InCheckDate]))

Sheryl wrote:
>
> I have a function dhCountWorkdays that I use in my query and then run a
> report from that query.
>
> My function gives me the workdays between the current date and
> [InCheckDate] field. The query runs, but puts an error in the blank field
> for my expression. That’s not a problem since no one would ever see the
> query.
>
> I have a report that is based on that query and I can’t run the report due
> to getting the error message ‘Data type mismatch in the criteria expression’.
> How can I get my query or report to ignore the blanks in my [InCheckDate]
> field when I use the dhCountWorkdays expression? Is there an IIf statement
> that can be used with my current expression?
>
> My expression in my query now is: Expr5:
> dhCountWorkdays(Date(),[InCheckDate])



Relevant Pages

  • Re: criteria error when running a report
    ... when all the answers and more come from all the MVPs. ... >> report from that query. ...
    (microsoft.public.access.queries)
  • criteria error when running a report
    ... I have a function dhCountWorkdays that I use in my query and then run a ... report from that query. ... I have a report that is based on that query and I can’t run the report due ... to getting the error message ‘Data type mismatch in the criteria expression’. ...
    (microsoft.public.access.queries)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • Re: Fields in Label dont give correct information
    ... You need to create a query based on tblRegEvent and tblRegPayment. ... -If your DCountis to count values in your report, ... half the time with very few errors (other than that label problem I had.) ... For example in the Room assignment on the report an idividual will be ...
    (microsoft.public.access.reports)
  • Re: Tips on domain aggregate replacements
    ... This already is a split db, but the users are 400 miles away from the server hosting the data:) They are all running the same copy of the FE locally on a single terminal server via TS/RDP sessions. ... It doesn't seem to have much impact on performance; the report takes just about as long to run if they are all logged in as it does when I am logged on testing it at night. ... I would do DSums from the controls on the report on the data returned by the query. ... The biggest offender is a certain report that needs to Sum a particular complex total for each of the next twelve months (the DSum in VBA was a sideline to this issue) and present these as items on each line of output. ...
    (microsoft.public.access.modulesdaovba)