Change colour or record selected in datasheet/subform

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

Guest

Hi all

Can anyone help me with this:

I have a form with a subform and would like to change the colour of that
row/record that has been selected so the user can see which record they are
looking at easily.

Is it possible to do this? If so, how?

Thanks in advance
 
Saj said:
I have a form with a subform and would like to change the colour of that
row/record that has been selected so the user can see which record they are
looking at easily.


I am assuming this is on a continuous form.

First, add a hidden text box namex txtCurID to the form's
header section. Use the form's Current event to set the
text box to the primary key field:
Me.txtCurID = Me.txtpkfield

Next, add a Rectangle control to the detail section set it's
BackColor property to the same color as the detail section's
color and make it as large as the entire section.

Now, set the rectangle's Conditional Formatting Expression
Is option to [txtpkfield] = [txtCurID]

Use the Format menu's Send to Back to put it behind all the
other controls. You may or may not want to make the other
control's BackStyle Transparent.
 
Dear Saj:

There is already a standard way of indicating the current row. Enable the
RecordSelectors for the subform. There is a pointer visible to show the
current row.

Tom Ellison
 
Sorry should have made myself clearer..
It is a form with two subforms within it, both are datasheets. when user
selects an item in the first subform they are then able to go to second form
which is linked to it by the orderline no. and they can then enter details
for this record.

I want the user to be able to highlight the row they want in the first form
then go to the second form to enter the details.. and whilst they do this the
row in above form stays highlighted.

your help in this is much appreciated.

Thanks again in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top