Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2004, 11:16 AM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datasheet View Auto Highlight a Row

I have a subform in datasheet view and am trying to auto select a record when the user clicks on a field.

To accomplish this manually, I can press F2 and then "Shift + Space" and the current record will become selected.

I tried to do a sendkeys on the GotFocus, Enter, On current, etc....but none of them produce the desired results.

I first tried just the F2 to see if it would highlight the field, but that produces inconsistent results. Here is my code

SendKeys "{F2}"
SendKeys "+ " 'The help file is a little vague on how to use the space within the sendkeys action.

Any thoughts would be greatly appreciated.

Thanks,
Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
reading a dataset into a form in datasheet view jd_erd Access 2 January 29th, 2007 04:26 PM
use vba to add a row to datasheet TerryAutomation Access VBA 2 July 11th, 2005 01:07 PM
Re: Add button on a form with datasheet view lxu Access 5 March 8th, 2004 06:19 PM
Datasheet View - Customize Dataman Access 0 February 16th, 2004 02:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.