ON KEY LABEL command within a form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Doug Allan (doug-allan_at_home.com)
Date: 03/17/04


Date: Wed, 17 Mar 2004 22:30:02 GMT

I'm trying to use F keys to access certain aspects of my program, like Save
and Print. These are being used in a form. In the form's Activate method I
have code that reads

ON KEY LABEL F2 DO NewRecord.

When the user presses the F2 key, a new record should be added to the file
with a few default values stuck in. The contents of this new records then
needs to display on the screen. It does the appending fine, but I can't get
it to refresh the screen with the new values.

>From what I've found out about the ON KEY LABEL command, it doesn't allow
you to access form objects. For instance I can't tell it after it's finished
appending the record to do a command like THISFORM.Refresh(). It gives an
error when I do that.

So my question is, how do I refresh the screen after running an ON KEY LABEL
command?

Thanks for your help.

Doug



Relevant Pages

  • Re: ON KEY LABEL command within a form
    ... but the command was ON KEY LABEL F2 THISFORM.NewRecord. ... but I can't get it to refresh the screen with the new values. ... >> it's finished appending the record to do a command like ...
    (microsoft.public.fox.vfp.forms)
  • Re: ON KEY LABEL command within a form
    ... property and the KeyPress Event in the help. ... ON KEY LABEL can be a bit tricky because they are active in whatever form ... > appending the record to do a command like THISFORM.Refresh. ... how do I refresh the screen after running an ON KEY ...
    (microsoft.public.fox.vfp.forms)
  • Re: Screen Refresh failure
    ... A standard Frame with several standard Command Buttons. ... or where partly drawn if forced to by dragging another app over ... Have you tried calling Refresh on the ...
    (microsoft.public.vb.general.discussion)
  • Refresh a local web page via Excel
    ... The detail on the sheet is frequently updated and the wish is for the projected page to update (refresh) automatically. ... Public Browser As Object ... At this point I need Excel to refresh the Page.htm with a command using something like the following: ...
    (microsoft.public.excel.programming)
  • Re: Full daily backup with MS backup on W2k3
    ... One more question about the LOG files. ... That line is used to refresh what Windows sees in your tape device. ... If you use the refresh command you'll need ... >> Hello Dajo, ...
    (microsoft.public.windows.server.networking)