Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report to retrieve most recent record change from a query.

Status
Not open for further replies.

bowldog

Programmer
Aug 1, 2001
24
US
I have a query that has the following fields:1-name, (timestamp for) 2-address change,3-telephone change, 4-name change,5-job postion change. I want to create a report that will list the record(s) that have been changed in the last 14 days for each change that may have been made.

Thanks in advance for any help
bowldog
 
I'm not clear what you want to see in the query result. Here are a couple of queries that may work for you. Or at least give you an idea where to start.

Example 1: Select all rows where at least one change occurred.

Select *
From YourTable
Where [address change]>date()-14
Or [telephone change]>date()-14
Or [name change]>date()-14
Or [job postion change]>date()-14

Example 2: Select each change on a separate row

Select
name,
"Addr Chg" As TypeChg,
[address change] As ChgDate
From YourTable
Where [address change]>date()-14
Union
Select
name,
"Tele Chg" As TypeChg,
[telephone change] As ChgDate
From YourTable
Where [telephone change]>date()-14
Union
Select
name,
"Name Chg" As TypeChg,
[name change] As ChgDate
From YourTable
Where [name change]>date()-14
Union
Select
name,
"Job Chg" As TypeChg,
[job postion change] As ChgDate
From YourTable
Where [job postion change]>date()-14
Terry L. Broadbent - Salt Lake City, UT
Home of the 2002 Winter Olympics (Feb 8-24)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top