This topic is locked

Limit List Page Records

9/19/2008 4:00:49 PM
ASPRunnerPro General questions
S
sfierce author

I have an Access db with one table. One of the fields is EndDate. I want to be able to have the List Page only show records where the EndDate field is empty. I think it will require adding code, probably to the events for that page, but not sure how to do it.
Any help will be appreciated.
thank you.

Sergey Kornilov admin 9/19/2008

You need to add a WHERE clause to your query (SQL query tab)

select ... from ... WHERE EndDate is null


or

select ... from ... WHERE EndDate=''
S
sfierce author 9/24/2008

You need to add a WHERE clause to your query (SQL query tab)


select ... from ... WHERE EndDate is null


or

select ... from ... WHERE EndDate=''


Tried to modify SQL query to no avail. Here is the query before and after and the change made no effect. The list page still shows records even if there is something in the EndDate field:

Query Before

SELECT TaskID,

Associate,

Task,

Description,

StartDate,

DueDate,

Progress,

Feedback,

EndDate.

FROM tasks
Query after adding suggested code

SELECT TaskID,

Associate,

Task,

Description,

StartDate,

DueDate,

Progress,

Feedback,

EndDate.

FROM tasks

WHERE EndDate=''

... also tried WHERE EndDate is null
Any advice will be greatly appreciated. thank you

J
JOHNF777 9/24/2008

In MSSQL I would try this:
SELECT TaskID,

Associate,

Task,

Description,

StartDate,

DueDate,

Progress,

Feedback,

IsNull(EndDate,0) AS EndDate.

FROM tasks

WHERE EndDate=0
/John

Sergey Kornilov admin 9/24/2008

Remove dot after EndDate

EndDate.


If this doesn't help test this query right in your database to get more detailed error message.

J
JOHNF777 9/24/2008

Good catch!