Results 1 to 13 of 13
  1. #1
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8

    How to Highlight an entire row in a sub form in ms access

    Hello,

    Could you please help how to Highlight an entire row in a sub form in ms access



    see printschreen and attachement.

    Attached Thumbnails Attached Thumbnails Photo1.jpg   Photo2.jpg  

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Something like this?
    Click image for larger version. 

Name:	Capture.PNG 
Views:	32 
Size:	46.2 KB 
ID:	50992

    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)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    Yes, how to make it

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I've given you two links - one to a working example and the other to detailed instructions. Now its up to you to implement this for yourself.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    Quote Originally Posted by isladogs View Post
    I've given you two links - one to a working example and the other to detailed instructions. Now its up to you to implement this for yourself.

    I tried to make it like the one in the link but the results are not the same as the one in the link I attach photos and databse
    Attached Thumbnails Attached Thumbnails Photo3.jpg  

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    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
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    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

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    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)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    Kirana123 is offline Novice
    Windows 10 Access 2021
    Join Date
    Oct 2023
    Posts
    8
    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

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by Kirana123 View Post
    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
    Attach your DB again, do NOT make us going to look for it? :-(
    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

  11. #11
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    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.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  12. #12
    Join Date
    Apr 2017
    Posts
    1,680
    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!

  13. #13
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    @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)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-16-2018, 05:19 AM
  2. VBA to highlight missing fields in a form
    By nick404 in forum Programming
    Replies: 13
    Last Post: 07-30-2015, 08:33 AM
  3. how can i highlight a selected row in form?
    By joe55555 in forum Access
    Replies: 4
    Last Post: 08-29-2013, 01:19 PM
  4. Replies: 5
    Last Post: 07-09-2013, 11:16 AM
  5. Replies: 9
    Last Post: 12-28-2009, 04:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums