highlight record in form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.
How can this be accomplished?
Sandrao
 
I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.
How can this be accomplished?
Sandrao

Access 2002 or newer?
See
http://www.lebans.com
specifically:
http://www.lebans.com/conditionalformatting.htm
You can down load a sample database that includes various uses for
shaded lines, including continuous form alternating lines and
highlighting the selected line.
 
sandrao said:
I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.


Add a hidden text box (named txtKey) to the form's header
section. Then add a line of code to the form's Current
event procedure:
Me.txtKey = Me.pkfield

With that in place, you can use Conditional Formatting on
any/all of the text boxes in the detail section. Set the
Expression Is option to [pkfield] = [txtKey]

Probably a better way to highlight the entire detail is to
add a text box to the detail section. Size it the same as
the detail section and use Send to Back to place it behind
all the other controls. Then use CF for just this one text
box. You probalbly will also want to set the other text
box's BackStyle to Transparent.
 
Thanks your suggestion works well. Just one little silly question.

How do you Send to Back ?

Marshall Barton said:
sandrao said:
I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.


Add a hidden text box (named txtKey) to the form's header
section. Then add a line of code to the form's Current
event procedure:
Me.txtKey = Me.pkfield

With that in place, you can use Conditional Formatting on
any/all of the text boxes in the detail section. Set the
Expression Is option to [pkfield] = [txtKey]

Probably a better way to highlight the entire detail is to
add a text box to the detail section. Size it the same as
the detail section and use Send to Back to place it behind
all the other controls. Then use CF for just this one text
box. You probalbly will also want to set the other text
box's BackStyle to Transparent.
 
Select the text box, then use the Format - Send to Back menu
item.
--
Marsh
MVP [MS Access]

Thanks your suggestion works well. Just one little silly question.

How do you Send to Back ?

Marshall Barton said:
sandrao said:
I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.


Add a hidden text box (named txtKey) to the form's header
section. Then add a line of code to the form's Current
event procedure:
Me.txtKey = Me.pkfield

With that in place, you can use Conditional Formatting on
any/all of the text boxes in the detail section. Set the
Expression Is option to [pkfield] = [txtKey]

Probably a better way to highlight the entire detail is to
add a text box to the detail section. Size it the same as
the detail section and use Send to Back to place it behind
all the other controls. Then use CF for just this one text
box. You probalbly will also want to set the other text
box's BackStyle to Transparent.
 
Thanks all works fine

Marshall Barton said:
Select the text box, then use the Format - Send to Back menu
item.
--
Marsh
MVP [MS Access]

Thanks your suggestion works well. Just one little silly question.

How do you Send to Back ?

Marshall Barton said:
sandrao wrote:

I have a form that is set to 'Continuous Forms'. I need to have the entire
"Record" highlighted. The reason is that I also have an subform attach which
contains centain information that I transfer to related fields in the Parent
form through a button. How do I have the entire record highlighted.
Generally speaking if you have a code in the first field of the record such
as Me.Field.BackColor = VbRead the entire field will change. I want to have
the record or line highlighted. This will be easier to know that the
information will be transferred to the proper record and field.


Add a hidden text box (named txtKey) to the form's header
section. Then add a line of code to the form's Current
event procedure:
Me.txtKey = Me.pkfield

With that in place, you can use Conditional Formatting on
any/all of the text boxes in the detail section. Set the
Expression Is option to [pkfield] = [txtKey]

Probably a better way to highlight the entire detail is to
add a text box to the detail section. Size it the same as
the detail section and use Send to Back to place it behind
all the other controls. Then use CF for just this one text
box. You probalbly will also want to set the other text
box's BackStyle to Transparent.
 
Back
Top