none
Character for F1 Key RRS feed

  • General discussion

  • I have a need to print some 2D bar codes.  I have an Active X control that does this fine.  The customer wants certain data included in the bar code.  I have created a query that contains the data needed.  If need be I can post the entire query, but for this post I will keep it simple.  The bottom line of the query is to create a field named String.  The SQL for that field is below.  As a result, to test, I have made the control source of the active x control control equal to [String].  This works fine, the Chr(29) is a GS (group separator).  The customer has verified this works.

    String: [String1] & [String2] & [String3] & Chr(29) & [String4]

    However, now the customer want The value for the F1 key in leiu of the chr(29) character.  I cannot find any reference for the way to do this.  I know that ? VBKeyF1 yields 112 in the immediate window, but don't know how I would use that?  Anybody kow how I could do it?

    Friday, September 4, 2015 1:55 PM

All replies

  • The F# keys are function keys and do not have a printable character representation as far as I know.
    Friday, September 4, 2015 2:17 PM
  • As a guess, print the value as a string? "112" ? or "F1"? or the barcode for "112" (whatever it is)?

    peter n roth - http://PNR1.com, Maybe some useful stuff

    Friday, September 4, 2015 4:42 PM
  • However, now the customer want The value for the F1 key in leiu of the chr(29) character.  I cannot find any reference for the way to do this.  I know that ? VBKeyF1 yields 112 in the immediate window, but don't know how I would use that? 

    112 -- like all of the vbKeyXX constants -- is a key scan code, and not a character value.  It is a number that identifies which key on the keyboard was pressed.  There is no character value for the function keys, so I think you need to find out what your customer means by "the value for the F1 key".  Maybe in some software they are using, the F1 key causes the insertion of a particular value.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Friday, September 4, 2015 5:23 PM