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!

Alternate Shading on a Continous Form 1

Status
Not open for further replies.

bitech

Programmer
May 19, 2001
63
US
Hello Gang!

I have a search results page that lists the results from the search the user has submitted. What I would like to do is have every other row highlighted. If you know of a way to do this, please let me know.
 
I sure hope you find a way to do this. I have a similar need to do this in a report. Seems like such a simple task...yet so difficult. A+, N+, MCP
 
IN Ms. A '97 and previous this is not possible on a FORM. IN Ms. A 2K, you would need to use conditional formatting.

IN ALL versions of Ms. A, it is easy to do on REPORTS, and has bewen discussed severally in these forums. The only real "trick" to understand is to put the code in the "on print" event. Beyond that, all you need to do is set ALL controls in the affected section (detail) to transparent and just toggle the backcolor property at each record.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Sorry, elementk reorganized their Web site and the page I listed is not available. The basic idea is to use Continuous Forms, and on the detail section of the form you design, put two controls (one right on top of the other) instead of one for each piece of information you want to display. Make one of the controls with a background color of white, and make the other control for the same piece of information with a different background color. Then, in the OnCurrent event for the form, determine (by whatever technique you decide to use) which of the two controls to use for a given line. Make the chosen control visible, and the alternate control invisible. That's it.
 
email me privately if you want a sample form for this... I have an application which has what you need.. Maybe I can Chop that part and send it to you...

ega4htm@yahoo.com

cheers,
 
jfischer, which method would you suggest using for determining the alternate occurence.
 
This is helpful, but I actually want to highlight every other line.
 
Use the modulus of either the record number or an incremented counter. I use this to simulate green-bar computer paper i.e. 3 lines shaded, 3 lines white etc.
JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top