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?
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?