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!

Are there any options on a Continuous Form? 1

Status
Not open for further replies.

nonturbo

IS-IT--Management
Aug 27, 2001
78
US
First off, when I say Continous Form, I'm not sure I've got the correct terminology. What I am speaking of is when you have a form that repeats the detail section for each record, similar to data-sheet view, only instead of looking like a spreadsheet, its a polished form. Got it? I hope so....

Now that we're on the same page, I'm looking for a way to visually organize the form further by color. For instance, have a row in the form background color set to green based on some circumstances, or red based on others. I'm not sure if this is even possible, but if so, it would be exactly what I'm looking for. Another great option would be to change the current record-row background color too, so aside from the little arrow that shows what record you're on, it'll pop out at ya..

If anyone can help, I'd be so greatful. Thanks in advance!
 
To highlight the current row, the solution I have used is to place a bound textbox with the unique identifier for that row (for example, an autonumber field from that table) on the detail portion of the form, calling it RecordID. I also place an unbound control on the detail portion of the form, calling it CurrentRecordID. In the OnCurrent event for the form, I set Form!CurrentRecordID = Form!RecordID. This sets all CurrentRecordIDs to the RecordID for the form I'm on.

I then select the textbox I want to have change formatting when I am on that record and choose Format..Conditional Formatting and set Condition 1 to "Expression is" and the expression to "Form!CurrentRecordID = Form!RecordID". Change the format to what you want it to be and choose OK.

When you select a form, the CurrentRecordID on every detail will be updated to the form you selected. The RecordID is unique for every record and the CurrentRecordID will only match the RecordID on the form you have selected. Your textbox will change for that form only.

If you want to have your background color of your form change, create a textbox behind all the other controls that is the size of your detail and apply the steps above. It will appear that the background color for that record changed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top