PC Review


Reply
Thread Tools Rate Thread

Date + 10 days?

 
 
Bob Quintal
Guest
Posts: n/a
 
      10th Jul 2007
=?Utf-8?B?YXJjaDI1Mg==?= <(E-Mail Removed)>
wrote in
news:9F8D2485-C1BB-41DB-8B94-(E-Mail Removed):

> I have a field that shows the date I sent a notice to someone.
> I want to create a field that automatically shows the date
> the notice is due back, which is 10 days from the sent date.
> I would also like the field to show up in red when the due
> date is past.


Set the control source of the new field to
=dateAdd("d",10,[DateSent])

Set the conditional format of the control to 'less than' DATE()

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
 
=?Utf-8?B?YXJjaDI1Mg==?=
Guest
Posts: n/a
 
      10th Jul 2007
I have a field that shows the date I sent a notice to someone. I want to
create a field that automatically shows the date the notice is due back,
which is 10 days from the sent date. I would also like the field to show up
in red when the due date is past.
 
Reply With Quote
 
Rob Parker
Guest
Posts: n/a
 
      10th Jul 2007
In your query, add the following calculated field:
DueDate: DateAdd("d",[NameOfDateSentField],10)
replacing NameOfDateSentField with the actual name of your sent date field.
Note that you should not store the DueDate field in a table, since it can be
calculated as required.

In your form or report (based on the query containing the DueDate field),
apply conditional formatting to the control bound to the DueDate field. Set
the condition to Field Value Is less than Date(), and select the text
colour/background colour you want.

HTH,

Rob

"arch252" <(E-Mail Removed)> wrote in message
news:9F8D2485-C1BB-41DB-8B94-(E-Mail Removed)...
>I have a field that shows the date I sent a notice to someone. I want to
> create a field that automatically shows the date the notice is due back,
> which is 10 days from the sent date. I would also like the field to show
> up
> in red when the due date is past.



 
Reply With Quote
 
=?Utf-8?B?YXJjaDI1Mg==?=
Guest
Posts: n/a
 
      10th Jul 2007
Bear with me, this is waaaaaay over my head, but I created the query and
added the calculated field information that you gave me and it is working
correctly because it the field appears in the Query Datasheet View. How can
I add that so it appears as a column on my table?

"Rob Parker" wrote:

> In your query, add the following calculated field:
> DueDate: DateAdd("d",[NameOfDateSentField],10)
> replacing NameOfDateSentField with the actual name of your sent date field.
> Note that you should not store the DueDate field in a table, since it can be
> calculated as required.
>
> In your form or report (based on the query containing the DueDate field),
> apply conditional formatting to the control bound to the DueDate field. Set
> the condition to Field Value Is less than Date(), and select the text
> colour/background colour you want.
>
> HTH,
>
> Rob
>
> "arch252" <(E-Mail Removed)> wrote in message
> news:9F8D2485-C1BB-41DB-8B94-(E-Mail Removed)...
> >I have a field that shows the date I sent a notice to someone. I want to
> > create a field that automatically shows the date the notice is due back,
> > which is 10 days from the sent date. I would also like the field to show
> > up
> > in red when the due date is past.

>
>
>

 
Reply With Quote
 
Rob Parker
Guest
Posts: n/a
 
      10th Jul 2007
As I said in my original post, you should NOT store the DueDate as a field
in your table. Since it can be calculated on-the-fly, that is what you
should do.

You simply base your form (or report) which is presenting the data on the
query with the DueDate field, rather than on the table. You are using a
form for your date entry/display, aren't you? Tables are for data storage,
not for data entry/editing. And the conditional formatting, which is what
you need for displaying some records with high-lighted fields, will only
work in forms and reports; you cannot use it in table or query datasheets.
You can set up a form in continuous view so that it resembles a table/query
datasheet if that's waht you want; or (better, and commonly) you design the
form so that it provides a clear useable interface to your data.

If this is all clear-as-mud to you, then I suggest you do some background
reading before going any further. Either buy a suitable reference book, or
browse some of the many web sites which offer Access tutorials. As a start,
here's a link to a compilation of Access resources and other information:
http://www.accessmvp.com/JConrad/accessjunkie.html

Again, HTH,

Rob

"arch252" <(E-Mail Removed)> wrote in message
news2C5AA45-B094-489C-80E0-(E-Mail Removed)...
> Bear with me, this is waaaaaay over my head, but I created the query and
> added the calculated field information that you gave me and it is working
> correctly because it the field appears in the Query Datasheet View. How
> can
> I add that so it appears as a column on my table?
>
> "Rob Parker" wrote:
>
>> In your query, add the following calculated field:
>> DueDate: DateAdd("d",[NameOfDateSentField],10)
>> replacing NameOfDateSentField with the actual name of your sent date
>> field.
>> Note that you should not store the DueDate field in a table, since it can
>> be
>> calculated as required.
>>
>> In your form or report (based on the query containing the DueDate field),
>> apply conditional formatting to the control bound to the DueDate field.
>> Set
>> the condition to Field Value Is less than Date(), and select the text
>> colour/background colour you want.
>>
>> HTH,
>>
>> Rob
>>
>> "arch252" <(E-Mail Removed)> wrote in message
>> news:9F8D2485-C1BB-41DB-8B94-(E-Mail Removed)...
>> >I have a field that shows the date I sent a notice to someone. I want
>> >to
>> > create a field that automatically shows the date the notice is due
>> > back,
>> > which is 10 days from the sent date. I would also like the field to
>> > show
>> > up
>> > in red when the due date is past.

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to pull <=14 Days, <=30 Days, >30 Days from a date column Ken Microsoft Excel Misc 3 23rd Oct 2009 12:53 AM
Conditional Formatting Dates calculating 10 days and 30 days from a certain date Sioux Microsoft Excel Worksheet Functions 2 11th Oct 2007 02:04 PM
Todays date minus 6 days before (Shows all records in 6 days) =?Utf-8?B?UmFjaA==?= Microsoft Access Queries 2 14th Sep 2007 12:46 PM
Determine dates by number of days, "what date is 180 days from now =?Utf-8?B?VFJMYW1i?= Microsoft Outlook Calendar 2 19th Apr 2007 03:30 PM
Business Days for based on a date of 7 days ago or longer =?Utf-8?B?QmFyYmFyYQ==?= Microsoft Access Queries 1 27th Oct 2003 09:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 PM.