Help me with this query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I hv this expression in my query

Expr1: DateDiff("d",[DATE_RECEIVED],Now())

How do i put some additional condition where field [status]="pending"

I''ve tried this

Expr1: DateDiff("d",[DATE_RECEIVED],Now()) where [status]="pending"

and its give me "headache"

Thanks
 
Expr1: DateDiff("d",[DATE_RECEIVED],Now())

presumably the above is a calculated field in your query design grid.

add the "pending" criteria to the criteria line of the [status] field in the
query design grid.

hth
 
Thks for your reply..is it possible to include it in the calculated field
without having to add it in the query design grid

tina said:
Expr1: DateDiff("d",[DATE_RECEIVED],Now())

presumably the above is a calculated field in your query design grid.

add the "pending" criteria to the criteria line of the [status] field in the
query design grid.

hth


zyus said:
I hv this expression in my query

Expr1: DateDiff("d",[DATE_RECEIVED],Now())

How do i put some additional condition where field [status]="pending"

I''ve tried this

Expr1: DateDiff("d",[DATE_RECEIVED],Now()) where [status]="pending"

and its give me "headache"

Thanks
 
If you don't want to use the criteria line, have you tried:
iif([Status]="pending";DateDiff("d",[DATE_RECEIVED],Now()); "Result for
False")

zyus said:
Thks for your reply..is it possible to include it in the calculated field
without having to add it in the query design grid

tina said:
Expr1: DateDiff("d",[DATE_RECEIVED],Now())

presumably the above is a calculated field in your query design grid.

add the "pending" criteria to the criteria line of the [status] field in the
query design grid.

hth


zyus said:
I hv this expression in my query

Expr1: DateDiff("d",[DATE_RECEIVED],Now())

How do i put some additional condition where field [status]="pending"

I''ve tried this

Expr1: DateDiff("d",[DATE_RECEIVED],Now()) where [status]="pending"

and its give me "headache"

Thanks
 
maybe you better explain what you're trying to accomplish with the
calculated field in the query, and the criteria - before we go any further.

hth


zyus said:
Thks for your reply..is it possible to include it in the calculated field
without having to add it in the query design grid

tina said:
Expr1: DateDiff("d",[DATE_RECEIVED],Now())

presumably the above is a calculated field in your query design grid.

add the "pending" criteria to the criteria line of the [status] field in the
query design grid.

hth


zyus said:
I hv this expression in my query

Expr1: DateDiff("d",[DATE_RECEIVED],Now())

How do i put some additional condition where field [status]="pending"

I''ve tried this

Expr1: DateDiff("d",[DATE_RECEIVED],Now()) where [status]="pending"

and its give me "headache"

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Problem with chart 1
Syntax error! 6
Default value of combo box based on DLookUp 2
dlookup in Query 10
Joining multiple queries into a single query 4
Access Query problem 1
Cascade queries 7
Query Question 1

Back
Top