If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query 90 expiration
I would like to run a qry that will show me when my insurance policyies
expire. Some expire in 30 days others in 90. Table: Customers Fields: CustomerName ContactName PolicyNumber PolicyExpirationDate |
#2
|
|||
|
|||
Query 90 expiration
On Mon, 26 Apr 2010 08:37:01 -0700, dar wrote:
I would like to run a qry that will show me when my insurance policyies expire. Some expire in 30 days others in 90. Table: Customers Fields: CustomerName ContactName PolicyNumber PolicyExpirationDate 30 or 90 days from when? How (based on the information in the table) can you tell which policy is 30 and which is 90? More information please! -- John W. Vinson [MVP] |
#3
|
|||
|
|||
Query 90 expiration
SELECT * FROM Customers where PolicyExpirationDate = Date() ORDER BY
PolicyExpirationDate This will list the future expiration dates but ignore those that have already passed. Assumes 'PolicyExpirationDate' is a date/time column. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "dar" wrote: I would like to run a qry that will show me when my insurance policyies expire. Some expire in 30 days others in 90. Table: Customers Fields: CustomerName ContactName PolicyNumber PolicyExpirationDate |
#4
|
|||
|
|||
Query 90 expiration
The PolicyExpirationDate will have a date of when the Policy will expire.
The policy may expire in August or November. i want to run a qry that will show me up coming policies that will expire at any given time. "John W. Vinson" wrote: On Mon, 26 Apr 2010 08:37:01 -0700, dar wrote: I would like to run a qry that will show me when my insurance policyies expire. Some expire in 30 days others in 90. Table: Customers Fields: CustomerName ContactName PolicyNumber PolicyExpirationDate 30 or 90 days from when? How (based on the information in the table) can you tell which policy is 30 and which is 90? More information please! -- John W. Vinson [MVP] . |
#5
|
|||
|
|||
Query 90 expiration
On Mon, 26 Apr 2010 10:36:01 -0700, dar wrote:
The PolicyExpirationDate will have a date of when the Policy will expire. The policy may expire in August or November. i want to run a qry that will show me up coming policies that will expire at any given time. Then create a query with an appropriate criterion on the PolicyExpirationDate. For instance, if you want to find which policies expire between today and a week from today, use a criterion = Date() AND = Date() + 7 -- John W. Vinson [MVP] |
#6
|
|||
|
|||
Query 90 expiration
Hello Dorian-
Is there any spaces? When I run it, it pops up a warning that I have a syntas error "Dorian" wrote: SELECT * FROM Customers where PolicyExpirationDate = Date() ORDER BY PolicyExpirationDate This will list the future expiration dates but ignore those that have already passed. Assumes 'PolicyExpirationDate' is a date/time column. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "dar" wrote: I would like to run a qry that will show me when my insurance policyies expire. Some expire in 30 days others in 90. Table: Customers Fields: CustomerName ContactName PolicyNumber PolicyExpirationDate |
#7
|
|||
|
|||
Query 90 expiration
John am I doing something wrong?
I entered test data in the field of PolicyExpirationDate with the below criterion, it returns a query with everything I entered. I entered random dates that were less than 7 days and more than 7 days. "John W. Vinson" wrote: On Mon, 26 Apr 2010 10:36:01 -0700, dar wrote: The PolicyExpirationDate will have a date of when the Policy will expire. The policy may expire in August or November. i want to run a qry that will show me up coming policies that will expire at any given time. Then create a query with an appropriate criterion on the PolicyExpirationDate. For instance, if you want to find which policies expire between today and a week from today, use a criterion = Date() AND = Date() + 7 -- John W. Vinson [MVP] . |
#8
|
|||
|
|||
Query 90 expiration
On Tue, 27 Apr 2010 08:08:01 -0700, dar wrote:
John am I doing something wrong? I entered test data in the field of PolicyExpirationDate with the below criterion, it returns a query with everything I entered. I entered random dates that were less than 7 days and more than 7 days. Please open the query in SQL view and post the entire SQL string here. Is PolicyExpirationDate in fact a Date/Time field, or is it perhaps Text (which looks like a date but won't search chronologically)? -- John W. Vinson [MVP] |
#9
|
|||
|
|||
Query 90 expiration
PolicyExpirationDate is set to Date/Time
SELECT tblCustomer2.CustomerName, tblCustomer2.ContactName, tblCustomer2.ContactNumber, tblCustomer2.PolicyNumber, tblCustomer2.Carrier, tblCustomer2.Premium, tblCustomer2.PolicyExpirationDate, tblCustomer2.PolicyType FROM tblCustomer2 WHERE (((tblCustomer2.PolicyExpirationDate)=Date() And (tblCustomer2.PolicyExpirationDate)=Date()+7)); .. "John W. Vinson" wrote: On Tue, 27 Apr 2010 08:08:01 -0700, dar wrote: John am I doing something wrong? I entered test data in the field of PolicyExpirationDate with the below criterion, it returns a query with everything I entered. I entered random dates that were less than 7 days and more than 7 days. Please open the query in SQL view and post the entire SQL string here. Is PolicyExpirationDate in fact a Date/Time field, or is it perhaps Text (which looks like a date but won't search chronologically)? -- John W. Vinson [MVP] . |
#10
|
|||
|
|||
Query 90 expiration
On Tue, 27 Apr 2010 10:30:02 -0700, dar wrote:
PolicyExpirationDate is set to Date/Time SELECT tblCustomer2.CustomerName, tblCustomer2.ContactName, tblCustomer2.ContactNumber, tblCustomer2.PolicyNumber, tblCustomer2.Carrier, tblCustomer2.Premium, tblCustomer2.PolicyExpirationDate, tblCustomer2.PolicyType FROM tblCustomer2 WHERE (((tblCustomer2.PolicyExpirationDate)=Date() And (tblCustomer2.PolicyExpirationDate)=Date()+7)) ; If you run that query today that should find only records with PolicyExpirationDate in the range from #4/27/2010# to #5/4/2010#. If it doesn't please post a few rows of your data indicating the dates that violate these conditions. That's wierd. -- John W. Vinson [MVP] |
|
Thread Tools | |
Display Modes | |
|
|