Unfortunately, the only method I know of involves SendKeys. Here is
sample code placed behind a CommandButton on the parent Form:
Private Sub cmdSelect_Click()
On Error GoTo Err_cmdSelect_Click
' SetFocu to the SubForm control
Me.frmcustomerSales.SetFocus
Me.frmcustomerSales.Form.Controls("NameOfyourTextB oxControlHere").SetFoc
us
' Make sure the entire field is highlighted
Sendkeys "{F2}"
' ' Ctl plus SpaceBar will highlight the entire column of the selected
control.
Sendkeys "^{ }"
Exit_cmdSelect_Click:
Exit Sub
Err_cmdSelect_Click:
MsgBox Err.Description
Resume Exit_cmdSelect_Click
End Sub
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bob" <sm*******@hotmail.com> wrote in message
news:v9********************************@4ax.com...
Hi Everybody
I have a form and Datasheet Subform
If I select the top of the column ie the title of any one of the
columns, I can manually focus on that vertical column.
My question; is there a way that I can shift the focus to the column
programatically, to all the records in the column, and not just the
1st record which is what I'm doing now.
Thanks
Regards Smiley Bob