20 days from "CallDate"

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

Guest

I have a date field in my query called "CallDate". I need the query to give
me records that are 20 days after the "CallDate". How can I do that?
 
Is "CallDate" a prompt from the query or a field in the table. I can not
tell from your post. If you are entering "CallDate" based on a prompt from
the query then what field will it be comapring the "CallDate" to?

Does "CallDate" exist in the table records?
 
Call Date is a date in my table. I have a form called "Contacts" in which I
enter all information on calls that I make. The Calls form is a subform on
the Contacts form.
The field "CallDate" is in a table called "Calls" which is linked to the
Contacts table by the ContactID field.
Thanks much.
 
Post the table structure for the two tables.

dhlively said:
Call Date is a date in my table. I have a form called "Contacts" in which I
enter all information on calls that I make. The Calls form is a subform on
the Contacts form.
The field "CallDate" is in a table called "Calls" which is linked to the
Contacts table by the ContactID field.
Thanks much.
 
Do you want the names of all fields and their properties, or how the tables
are linked?
 
Contact Table:
ContactID
LastName
FirstName
CoName
Address1
Address2
City
State
Zip
ContactTypeID
WorkPhone
WorkExtension
EmailName
Title
AssistantName
Dear
Region
Country
MobilePhone
FaxNumber
LastMeetingDate
ReferredBy
Notes
DateMailed

Calls Table:
CallID
ContactID
CallDate
CallTime
Subject
Notes

The tables are linked by ContactID. I use a form based on the Contacts
Table and a subform based on the Calls Table. When I visit a customer, I
look up their record using the Contact form, and enter the information on the
call such as the date and time of the call and what we talked about.
I would like to create a query that when run, shows me the customers I
talked to 20 days ago, based on call date, so that I can revisit them.
Thanks for all of your help.
 
I recommend using one field for date and time. Also add another field to
Calls Table named something like Finish as a Yes/No to check if that call
does not need to show again.

I only put LastName from Contact Table in the query. You can add as much as
you need for your form that will use the query.

SELECT [Contact Table].LastName, [Calls Table].CallDate, [Calls
Table].Subject, [Calls Table].Notes, [Calls Table].Finish
FROM [Contact Table] INNER JOIN [Calls Table] ON [Contact Table].ContactID =
[Calls Table].ContactID
WHERE ((([Calls Table].CallDate)<=Date()-20) AND (([Calls Table].Finish)=0));
 
Sorry I haven't thanked you for your help. I haven't had a chance to work on
my database - been to busy otherwise. Hopefully I can give it a try sometime
this week.
Thanks again.
--
DHLively


KARL DEWEY said:
I recommend using one field for date and time. Also add another field to
Calls Table named something like Finish as a Yes/No to check if that call
does not need to show again.

I only put LastName from Contact Table in the query. You can add as much as
you need for your form that will use the query.

SELECT [Contact Table].LastName, [Calls Table].CallDate, [Calls
Table].Subject, [Calls Table].Notes, [Calls Table].Finish
FROM [Contact Table] INNER JOIN [Calls Table] ON [Contact Table].ContactID =
[Calls Table].ContactID
WHERE ((([Calls Table].CallDate)<=Date()-20) AND (([Calls Table].Finish)=0));

dhlively said:
Contact Table:
ContactID
LastName
FirstName
CoName
Address1
Address2
City
State
Zip
ContactTypeID
WorkPhone
WorkExtension
EmailName
Title
AssistantName
Dear
Region
Country
MobilePhone
FaxNumber
LastMeetingDate
ReferredBy
Notes
DateMailed

Calls Table:
CallID
ContactID
CallDate
CallTime
Subject
Notes

The tables are linked by ContactID. I use a form based on the Contacts
Table and a subform based on the Calls Table. When I visit a customer, I
look up their record using the Contact form, and enter the information on the
call such as the date and time of the call and what we talked about.
I would like to create a query that when run, shows me the customers I
talked to 20 days ago, based on call date, so that I can revisit them.
Thanks for all of your help.
 
Back
Top