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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query with multiple 'stages'

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
I currently have a query that will display all records that are over 3 hours old.

I have a form that automatically pops up and refreshes the query every minute.

What I want to do is distinguish between records that are over 1 hour old, 2 hours old, and 3 hours old, and have them displayed in a seperate colour depending on the 'age' - or have a field which is poulated with either 1, 2 or 3 respectively.

Also,
at the moment, the results are displayed as a list of record ID numbers.
I want to be able to double-click on any of the ID numbers to bring up that record. is this possible?

thanks,
Matthew
 
Matthew,

Displaying detail rows in a different color on a form is almost impossible in Access 97 or older. I understand that there's a way to do it in Access 2000, but I've not taken a look for myself. You can set a field to a 1, 2 or 3 very easily, however.

In your query, you could set a field to the number of hours old the record is and display this field as an integer value.

You can put coding attached to the DoubleClick event for the recordID field on the form. In the coding, open another form with a WHERE clause limiting the form's output to the recordID that was selected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top