MS Access 97, field graphics when browsing tables

Results 1 to 2 of 2

Thread: MS Access 97, field graphics when browsing tables

  1. #1
    Join Date
    Dec 1969

    Default MS Access 97, field graphics when browsing tables

    I have a client who browses his Access database and wishes to have a graphic alert button displayed in one field of every record. The button would be 1 of 3 colore, red green,yellow depending on a claculation of other fields of the record. What he does now is he has to calculate the urgency by subtracting one date from the other in 2 fields. He no longer wishes to do this but wants the button color to change on that row according to the calculation. He does not wish to change driver.<BR><BR> Years back I was able to produce this effect using Delphi and paradox tables. At a pre-event to update the row, I would calculate the fields and determine where the graphic would go by calculating the screen co-ordinance. There was no appreciable degradation of processing and the rows would scroll without any<BR>noticible flicker. The graphic was not taken from the blank field, but was taken from a file and stored.<BR><BR> Access graphics center around forms and reports for graphic display and OLE objects as far as I know. Is there a method I can use to produce this effect in Access?. <BR><BR> Thanks.

  2. #2
    Join Date
    Dec 1969

    Default Are you talking about Access *only*... opposed to Access DB reached by way of an ASP page?<BR><BR>I can tell you how to do the SQL query that will return one of three colors, but if this is Access DB standalone, then you&#039;ll have to figure out how to get that color into the button.<BR><BR>You don&#039;t specify exactly how you decide the color, so I&#039;ll make up an example:<BR><BR>Let&#039;s say this is for a payment system. If a payment is not yet due, then the color is green. If the payment due but is less than 15 days overdue, the color is green. 15 days or more and the color is red.<BR><BR>So:<BR><BR> SELECT <BR> loanNumber, <BR> dueDate, <BR> IIF(dueDate &#062; Date(), &#039;green&#039;, IIF(dueDate &#062; Date()-15, &#039;yellow&#039;, &#039;red&#039;) ) AS buttonColor<BR> FROM loans<BR> ORDER BY dueDate<BR><BR>The ORDER BY is optional; it would put all the reds first, then yellows, then greens. If you did ORDER BY loanID, then the colors would be scrambled, of course.<BR><BR>IIF is a handy function in Access. If you don&#039;t know it, go read up on it.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts