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

Highlight the record with a highest value

Status
Not open for further replies.

qwerty70

Technical User
Dec 13, 2005
73
GB
Dear All,

My inquiry is relevant to thread702-1381356 of the Access forms.

In my report, is there any way to highlight a record that contains the highest revision number? As you can see per my sample data below, the revision number field have 2 different value formats; alpha-numeric and number. Therefore, the highest revision should be "3E". Please help.

txtDrwgNum txtRevNum
20-SD-2001 1A
20-SD-2001 2F
20-SD-2001 3
20-SD-2001 3E

Thanks in advance,

qwerty70
 
What do you mean by "highlight"? Can you mention specific format properties and values you want to set?

Also, would you expect 12C to be higher than 3A?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom, thanks for the reply. Highlight means shading the row that has the highest revision number. In my sample data, I want to see all those 4 records in my report but the last should be shaded because it has the highest revision number.

Yes, I would expect 12C is higher than 3A.

Please help. Appreciate your help.

Regards,

qwerty70
 
Do you understand why 12C is a lower value than 3A? If you are storing two different values (number and letter), you are better off using 2 fields.

Try create a text box in the detail section of your report:
Name: txtNewRevNum
Control Source: =Format(Val([txtRevNum]),"00000000") & [txtRevNum]
Visible: No
Then a similar text box in the Report Header section:
Name: txtMaxRevNum
Control Source: =Max(Format(Val([txtRevNum]),"00000000") & [txtRevNum])
Visible: No
You can then use conditional formatting on any text box with "Expression Is"
[txtMaxRevNum]=[txtNewRevNum]


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top