Hello,
Could you please help how to Highlight an entire row in a sub form in ms access
see printschreen and attachement.
Hello,
Could you please help how to Highlight an entire row in a sub form in ms access
see printschreen and attachement.
Something like this?
Screenshot from my article https://www.isladogs.co.uk/emulated-...orm/index.html
A quick Google search will give lots of articles explaining how this is done. For example: How To Highlight The Current Row In A Continuous Form In 3 Steps (vbahowto.com)
Yes, how to make it
Here's another example with a continuous form, an emulated split form & a datasheet (where the effect is built in)
Study the continuous form example which is slightly different from that on the vbahowto.com link
Firstly, that dummy field has to be on the detail line. Then you need to apply conditional formatiing to every control on that record?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
My approach is slightly simpler. Only one control needs to have conditional formatting applied
I've just written detailed instructions in a new web page: Highlight Current Record in Continuous Form (isladogs.co.uk)
I tried to make it like in the example but it didn't work, please see in my databse, what I did wrong. I'm a little crazy about this matter
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
My new web article provides detailed instructions along with an example database showing that in action.
The last screenshot you showed preceded me doing that.
I spent almost 2 hours creating that article. Study it carefully & apply it to your own database.
I'm not going to do the rest of this for you or you will learn nothing.
In your post #1, I see a continuous form, but on your picture it is somehow weird - the are no record selectors at left of every row (look at Isadog's post #2 - in 11th row which is selected one, it is black, with tiny arrow in it)
In your later postings, all those pictures are displaying various single forms. In single form, the displayed row is always the selected one.
So I'm somewhat confused - what are you meaning with "highlight", and for what you need this. I'm suspecting you want to copy the entire row from form, and paste it somewhere!
@Arvil
It is a continuous form but the OP didn't correctly follow the method described in my link in post #2.
The yellow box on the top right is a 'marker' used to indicate the current record ID. Its normally hidden
I've since provided a working example and detailed instructions for a simpler method but he(?) hasn't shown any indication of having tried it
BTW Record selectors aren't required in a continuous form nor are they needed to highlight the current record (though it may make it easier to do so)
Dear Isladogs,
thank you a lot for your example on your website, which i have found through the big search engine.
In my case, I am trying to replace a listbox, with let's say tasks, with a continous form so i can use conditional formatting if a task is beyond its deadline.
In a later phase in my form Orders, I want to also add images, as a visual reference for the user, in my listbox for Orders so I think I'll need to replace it with a continous form too.
But in both cases i would like to remove the feeling you are in a continous form, they are looking very archaic imo.
For this I would like to: -hide the grey column with row indicators, and replace it with highlighting.
Hiding the grey column I found is possible through setting the record selector and navigation buttons property to no, on the form control itself.
I found your method is working if the records are enabled. But in my case the records arent editable, I really want it to work as a common listbox. I adapt and create rows in subforms through cmdbuttons.
In case anyone would know how to have a workaround for this, because I cannot think of one.
Thank you for posting the solution, it is very nifty.
Kind Regards
d
Limited formatting is possible with listboxes. See Add colour to queries, listboxes & combo boxes. However, though I doubt it will be sufficient for your needs
However in general using forms or subforms gives much greater flexibility
I'm not sure I understand your issue
Unlike datasheets, the appearance of continuous forms can be modified significantly to suit your preferred style.
The approach I demonstrated works perfectly with both record selectors and navigation buttons hidden.
In fact that is my normal mode of working
I've just checked and it also works if AllowEdits is set to No so the form is locked
It also still works if each control is disabled and/or locked as in this screenshot:
If you still don't like the appearance of continuous forms you could try using a split form with the splitter bar moved to the top disabled so the single form section is hidden
That will leave you with a datasheet form with any controls from your split form
Or you can use an emulated split form but with a continuous form in the lower half.
See these various articles:
Simulated Split form ; Split Form Issues ; Emulated Split Form
I also have a lot of other articles on ways of enhancing continuous forms which I've collated at: You Can REALLY Do All That With Forms?
I'm sure you can find something that does what you want & looks OK to you