Results 1 to 10 of 10
  1. #1
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80

    Transmitting Key Stokes for Fkeys

    I have a code that transmits data to another program. The issue I am running in to is that one of the areas I need to enter data in to requires an odd keystroke to save and exit. This requires 'F1' followed by 'e'.
    I have read up on this and it seems there is no easy way to do this since there is no ascii equivalent for the F# keys. Does anyone know of any sort of work around to have this go?
    I am not looking to simply hotkey or anything like that since this is used on multiple machines.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Would you post the code you are using to "transmit" data to another program, please?

  3. #3
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80
    I am using Reflection and transmitting:
    With Reflection
    .Transmit "^Consult Service Tracking"
    .Transmit Chr(13)

    What I need after this is some way to tell it to do F1 + e to save it.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,411
    That's Unix syntax. How does it relate to Access?

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    How does the other program accept the data you send to it? I would assume it is a character string, so you'll have to determine what character combination it uses to represent a function key (if it even can do that), since there is no ASCII code for it. This is not so much an MS Access issue as it is for the program you are sending the data to.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    From what little I've read of the Pro version specs, it supports Microsoft OLE Automation so maybe the provider has a library type file you can use in Access.
    Or dare I mention that SendKeys is capable of emulating a function key press...
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by John_G View Post

    ...since there is no ASCII code for it...
    I have a chart of ASCII codes (no idea where I got it from...the file creation date is eight years ago) that gives the code for F1 as 112.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    InsuranceGuy is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Aug 2015
    Location
    Colorado
    Posts
    126
    If by Reflection you mean Attachmate Reflection, there are codes for all function keys. Depending on what terminal, the codes may differ a bit. The easiest way I'd found do use Attachmate in the past was to look at the Keyboard Map in the Options menu. Whatever was indicated as the mapped value of a key I could transmit instead and achieve the same result. Mostly, F1 becomes <F1> or <Pf1> or similar. It's all in the Attachmate automation help files.

    That said, this is not an Access question at all, even if you're using Access VBA to run your Reflection client. It's a question about Reflection.

    Good luck.

  9. #9
    Ekhart is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2016
    Posts
    80
    Yes F1 is mapped to Pf1 in Reflection but I still need to transmit the keystroke of F1. If I use .transmit I can only get it to send the value (112 for example). I can try to create a macro for this in Reflection but need to figure out how to call it up from access.

  10. #10
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    After re-reading, it's not real clear on which way you're trying to send the keystroke. It ought to be from Access, otherwise I suppose you wouldn't be asking here. So did you try SendKeys or does the idea not appeal to you?

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums