highliting a row by using the record selector

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I have a continious form with textboxes and with a Record
Selector. When I'm clicking on the Record Selector there
is an arrow on it pointing on the row.
How could I, in addition, make the whole row (textboxes)
highlighted by clicking on the Record Selector.

Thanks in advance
 
Alex,
Unfortunately Access doesn't have a built-in way to highlight records in a
continuous form. But you can simulate it by using Conditional Formatting...

- Add an unbound control to the forms header that will contain the selected
records identifier.
-Add a "background" text control that is behind everything else. Include
conditional formatting that makes it filled with your highlite color when the
reced identifier and the unbound control are equal.
- Add code to the form's GotFocus event that copies the record identifier to
the unbound control and then refreshes the form (Me.Refresh)

There are variations on this theme but I hope this might give you the basic
idea.

Tom
 
I have a continious form with textboxes and with a Record
Selector. When I'm clicking on the Record Selector there
is an arrow on it pointing on the row.
How could I, in addition, make the whole row (textboxes)
highlighted by clicking on the Record Selector.

Thanks in advance

It's not inherent in Access, but take a look here:
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.

And also look at:
http://www.lebans.com/alternatecolordetailsection.htm
 
Thanks a lot Tom.
But, could you please clarify how the unbound control (is
it texbox?) can contain the selected records identifier
(what is that?).
I know how to set the conditional formatting. However, I
have no idea how I should check whether the unbound
control and selected records identifier are equel and copy
the record identifier to the unbound control.

Regards,

Alex
 
Alex,

By "record identifier" I mean some field in the record that makes it unique.
Could be a customer name, ID number, date, whatever.

Yes, the unbound control would be a text box with its Visible property set
to No.

Let's say the unbound control is named txtTgtCust and the control that
contains the record identifier is named txtCustName. In your conditional
formatting, you would set an expression that would cause a backgound fill to
be like hilghighting like so...
[txtTgtCust] = [txtCustName]
 
TomU said:
Alex,
Unfortunately Access doesn't have a built-in way to highlight records in a
continuous form. But you can simulate it by using Conditional Formatting...

- Add an unbound control to the forms header that will contain the selected
records identifier.
-Add a "background" text control that is behind everything else. Include
conditional formatting that makes it filled with your highlite color when the
reced identifier and the unbound control are equal.
- Add code to the form's GotFocus event that copies the record identifier to
the unbound control and then refreshes the form (Me.Refresh)

There are variations on this theme but I hope this might give you the basic
idea.

Tom
 
Back
Top