I have two datasheet sub-forms on the same form, both are display only and not for user input. They are locked and disabled, but one form has the first row selected or highlighted. The other form does not. I am not sure what steps I took to remove the highlighted row but I'd like both forms to not have the highlighted row. I googled extensively and saw many people asked but didn't see any resolution.
If I click the 2nd row and tab away and come back then I do get the unselected view that I am trying to get. Thanks in advance.
Found a post to try this code, but it didn't work:
Private Sub Form_GotFocus() Me.SelHeight = 0 End Sub
Adam Schwanz
@Reply 12 months ago
Set the focus somewhere else with the On Load or On Current Event of the main form.
FieldName.SetFocus
Maybe you set it to a textbox that you set the height to 0 so you don't see it or something.
SetFocus
Sami Shamma
@Reply 12 months ago
Watch the following video in which Richard explains why you should NOT use data sheets. Subdatasheets
WES WESOP
@Reply
12 months ago
@adam, I'll try this
@sami, this is a subform in datasheet view, not a subdatasheet as mentioned in the video posted.
@both, What's weird is if I open only the sub form the row is deselected. But when I open the main form with the embedded into a tab control, the sub form the top row is highlighted. Then if I click the 2nd row and go to another tab and come back neither 1st or 2nd row are selected which is the view I'm trying to get to. (don't see a way to post a screenshot if you would like to see one)
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.