Insert the value from the same field in the previous record

D

Di Cook

Hi, am wondering if someone knows the commands behind the keyboard shortcut
CTRL +APOSTROPHE. We're moving to Vista and cannot use Sendkeys to forward
these keystrokes.

We enter numerous timesheets and many of the fields have the same value as
the previous record. Using Autokeys/Sendkeys we set up the F11 function key
to send ^('){tab}, i.e. CTRL+APOSTROPHE (') then the TAB key. This worked
brillantly, we could just press F11 when we wanted to copy the same field
from the previous record and automatically move to the next field and in all
probability press F11 again. Now we have to type in CTRL+Apostrophe and
then the TAB key for each field - no where near as efficient. Would be very
grateful for help.
 
J

Joan Wild

You could set the default value of each control after updating it. Use the
AfterUpdate event for the control....
ControlName.DefaultValue = chr(34) & ControlName.Value & chr(34)
If the data in the control is a number use
ControlName.DefaultValue = ControlName.Value
 
D

Di Cook

Hi Joan,

Thanks for your suggestion. Unfortunately we need the versatility of
deciding on each field for the particular record as we're entering data and
think it advisable that a new record only contains default values such as
today's date and the operator knows they have to fill in the blank fields.
Really appreciate you getting back to me.
Di
 
J

Joan Wild

I don't use Vista, so I don't have any suggestions on this limitation.

Why doesn't your sendkeys work anymore?
 
D

Di Cook

Hi Joan,

Sendkeys doesn't work when you transfer over to Vista. Anyone who used the
AutoKeys and Sendkeys setups will not be able to use them in Vista, even
though the Visual Basic Program Manager made this statement last July
on the MSDN blog:
http://blogs.msdn.com/davbosch/archive/2006/02/26/539470.aspx
# re: Vista To Support Legacy VB6 Apps @ Sunday, July 30, 2006 7:38 PM
Pasquale,

I'm the VB Program Manager responsible for Visual Basic 6 on Vista. The
SendKeys issues has been corrected and will be released in Vista RC1. The
calls to SendKeys that work under Windows XP will work the same way under
Vista.

Hope that helps.
Thanks,
Chris Mayo
Visual Basic Program Manager
cmayo

MS now say "it's a documented change that under most situations sendkeys
will not work in vista if User Access Control (UAC) is enabled this is
because the user has decided they don't want programs doing things with
other parts of their OS without their knowledge"

I appreciate your interest.

Di
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top