Solved Continuous Forms - Highlighting records

Dave E

Registered User.
Local time
Today, 10:21
Joined
Sep 23, 2019
Messages
140
Hi All,

I have a form with 2 subforms. The Form is the 'shell' which holds all the general operations like, opening other pop-up forms for info, search buttons and search fields, Quit button etc.

The first subform (PlantList) holds the PrimaryID, LatinName and CommonName from the main table on a Continuous form list from where a record can be on-clicked to select the rest of the plants info in the second subform (MainView).

I have been trying to get the selected record on the Plantlist form to remain highlighted even after it's lost it's Lost Focus and only changes when another record in the same list is selected. That way, when I'm working thru the list I have a visible bookmark.

I have searched a lot of options, both on Google and Access World, but have, to date, yet to find a method that works for me.

Conditional formatting, of course, won't work in the way I need.

Does anybody have any ideas, or has seen a method that, solves my requirement?
 
you will be needing to add two Unbound textbox. on the PlantList subform for the Marker effect.

first select all your textbox on Plantlist subform.
set their background to Transparent.
add an Unbound Textbox to the subform.
stretch this textbox to cover all underlying textboxes on the subform.
set its background to Normal.
right click the unbound textbox and choose: Position->send to back.
name the unbound textbox as txtHilight.

next add another unbound textbox, just above the column labels.
set its visible property to No.
name the unbound textbox txtID.

add code to the subform's CurrentEvent:
Code:
private sub form_current()
Me.txtID = Nz(Me.PrimaryID, 0)
end sub

select unbound textbox, txtHilight.
add Conditional format:
Code:
Expression Is: [txtID] = [PrimaryID]
choose the background color (yellow) as the highlight.
 
IslaDogs- Thanks. I already tried those methods without success. Not sure why but gave up.
arnelgp - Thanks, your solution appears simple but failed for me. I have 3 fields in the continuous form: LatinName, CommonName and an invisible Primary ID.
I followed your method and found that the Unbound control highlighted correctly but, although the 2 name fields Backs were Transparent, the highlight could only be viewed on the oppposite field to the one clicked (selected). Very odd.
 
Hi. I think you can make conditional formatting work here. You may just need to have a place (control or variable) to keep track of which record to highlight.

Edit: Sorry, I just read Arnel’s suggestion, and I think I was trying to say the same thing. So, if that approach didn’t work for you, could you please post some screenshots, so we can see how you implemented it? Thanks.
 
Thanks, theDBGuy. I will post some screenshots on Wednesday when I'm back on the PC.

Cheers
 
I followed your method and found that the Unbound control highlighted correctly but, although the 2 name fields Backs were Transparent, the highlight could only be viewed on the oppposite field to the one clicked (selected). Very odd.
That is normal behavior. Instead you can make the fields background normal and just put conditional formatting to the fields. See demo where I replicate your issue and the second is just highlighting the normal background fields. Using the first method you may have to set focus or modify the format so you do not loos the format in the current field.
 

Attachments

Thanks to all of you - isladogs, arenlgp, theDBguy and MajP.
I tried all the options suggested and eventually succeeded with the method shown by MajP's demo Db.

Thanks again.

Davee
 
yes, after 8 hrs of this post, his experiment did succeed.
 
sorry, not about you.
 
Glad you've found a solution you're happy with.
Just FYI, one advantage of using the approach I suggested in the emulated split form is that you can also highlight the background behind a checkbox control

Also
sorry, not about you.
????
 
Anyone have a solution to the OP's issue with using a textbox behind the controls. I tried changing some properties but the conditional backcolor is still lost on got focus.
 

Users who are viewing this thread

Back
Top Bottom