Before Due Date Help

J

jbento

All,
I would like to create a query that will give me a due date -10days before
the due date.

For instance, I have a field called: entryDate, and then I have a dueDate
field. The user types 1/20/04 in the entryDate field. I would want the
dueDate field to automatically subtract 10 days from 1/20/04 and populate
that into the dueDate field.

I would want this query connected to a report, so a user could look at it
and see every record that has a -10 due date.

Would the code be something like this:

dueDate=DateAdd("d",-10,entryDate)

I have created something that is not working. Let me explain what I have
done:

1. I have a select query with these fields:

testID = Autonumber
entryDate = Date/Time
dueDate = Date/Time
results: [dueDate]=DateAdd("d",-10,[entryDate])

I try the query out by putting a date in the entryDate field, but nothing
happens to the dueDate field.

Here is the query:

SELECT tbl_test.testID, tbl_test.entryDate, tbl_test.dueDate,
[dueDate]=DateAdd("d",-10,[entryDate]) AS Expr1
FROM tbl_test;

What am I doing wrong?
 
D

Duane Hookom

To filter records, you need to place an expression in the Criteria. This
will compare a field value with another value.

Try this and come back if you have questions.
 

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


Top