473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Need Help Subform Data Sheet

Bob
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
Nov 12 '05 #1
2 1451
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


Nov 12 '05 #2
Bob
On Wed, 19 May 2004 03:59:36 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:

Hi Stephen

That worked great.
Spot on.

Thanks very much

Smiley Bob

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("NameOfyourText BoxControlHere").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


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ian Ornstein | last post by:
in posting http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&newwindow=1&selm=bmEK9.43452%24lj.1060600%40read1.cgocable.net Lyle showed us that an ADODB.Recordset can be created and attached to a...
2
by: Scott | last post by:
In my database, I have a form with a subform. I had everything working correctly - the correct records would display on the subform for each record on the form. I could edit, add, and delete on the...
1
by: xmp333 | last post by:
Hi, I have a data sheet with a subform; each time the user clicks on the "+" to show the subform, I want some code to run. I tried attaching the code to a wide variety of events, but at best...
2
by: Bill Agee | last post by:
I have a subform called PaymentDetails and would like to dynamically assign the recordsource after the form/subform is opened. The recordsource for Payment Details is "PaymentDetails_qry" which...
1
by: Momo4 | last post by:
I have a unbound main form with unbound fields that correspond to fields on a bound data sheet subform. As you enter data on the subform, the corresponding fields get updated through code (e.g....
1
by: teddyparnell | last post by:
I have a query that works, but then displays the results in a datasheet view. The query is reliant on the results of a combo box, and when i update this combo box and click a button the results of...
3
by: Midiman69 | last post by:
Can any one help with a problem I have with a tab control form I have a form with a two page tab control - page 1 being the main form. I have a data sheet view subform on page 2.(linked by...
1
by: Nick via AccessMonster.com | last post by:
Hello, I'm using a form that has a subform. The subform is linked to a hidden datasheet form, and the subform displays records from the form. The problem is, the subform will only show X...
2
by: Smartin | last post by:
Using Access 97 I am trying to create a form that allows for user entry of search terms and displays a table of results. I thought I could accomplish this using a subform but it isn't quite...
7
by: Ken Mylar | last post by:
First a quick background on the form: I have a form that is normally viewed in Single form mode. It has a subform on it that is in datasheet view. The main form is for work orders and the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.