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 Day Criteria
I am trying to get a criteria , [tblCompanyInfo.Warning1] is a number field
let say "15" I am trying to filter records 15 days older than [tblHorseInfo.ServiceDate] SELECT tblHorseInfo.HorseID, tblHorseInfo.ServiceStallion, tblHorseInfo.Service1, tblHorseInfo.ServiceDate, qryHorseNameAll.Name, Format([ServiceDate],"dd-mmm-yy") AS MyDate, tblHorseInfo.Status, tblCompanyInfo.Warning1 FROM tblCompanyInfo, tblHorseInfo INNER JOIN qryHorseNameAll ON tblHorseInfo.HorseID = qryHorseNameAll.HorseID WHERE (((tblHorseInfo.Service1)=0) AND ((tblHorseInfo.Status) Like "Active")); -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 |
#2
|
|||
|
|||
Query Day Criteria
I Dont believe it, I think Ive done it
SELECT tblHorseInfo.HorseID, tblHorseInfo.ServiceStallion, tblHorseInfo.Service1, tblHorseInfo.ServiceDate, qryHorseNameAll.Name, Format([ServiceDate],"dd-mmm-yy") AS MyDate, tblHorseInfo.Status, tblCompanyInfo.Warning1 FROM tblCompanyInfo, tblHorseInfo INNER JOIN qryHorseNameAll ON tblHorseInfo.HorseID = qryHorseNameAll.HorseID WHERE (((tblHorseInfo.Service1)=0) AND ((tblHorseInfo.ServiceDate)Date()-[Warning1]) AND ((tblHorseInfo.Status) Like "Active")); "Bob Vance" wrote in message ... I am trying to get a criteria , [tblCompanyInfo.Warning1] is a number field let say "15" I am trying to filter records 15 days older than [tblHorseInfo.ServiceDate] SELECT tblHorseInfo.HorseID, tblHorseInfo.ServiceStallion, tblHorseInfo.Service1, tblHorseInfo.ServiceDate, qryHorseNameAll.Name, Format([ServiceDate],"dd-mmm-yy") AS MyDate, tblHorseInfo.Status, tblCompanyInfo.Warning1 FROM tblCompanyInfo, tblHorseInfo INNER JOIN qryHorseNameAll ON tblHorseInfo.HorseID = qryHorseNameAll.HorseID WHERE (((tblHorseInfo.Service1)=0) AND ((tblHorseInfo.Status) Like "Active")); -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 |
Thread Tools | |
Display Modes | |
|
|