Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Location
    Swindon, UK
    Posts
    86

    Lightbulb Unanswered: Capturing Keystrokes

    Does anyone know how to capture keystrokes and store them in a table, so that they can be re-used at a later date?

  2. #2
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Keystrokes from where ? A text box on a form ? You could try on_keydown event in forms, textboxes, and so on.

  3. #3
    Join Date
    Feb 2004
    Location
    Swindon, UK
    Posts
    86
    i have a form, which users enter a customers address, i then need to store the character codes of what is entered so that i can programmatically enter them on another piece of software

  4. #4
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    Capturing key strokes is abad idea because then if a user makes a typo error and retypes, you'll be capturing everything good info + garbage and there will be no way for you to filter it. What you can do is after a user enters all the info in the text box then after_update event for that control you can save the whole text to wherever you like.


    Originally posted by Mowgli212001
    i have a form, which users enter a customers address, i then need to store the character codes of what is entered so that i can programmatically enter them on another piece of software

  5. #5
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Sure,

    Are there many textboxes on your form that are used ?

    Give me the name of the fields and/or the table, you have already, and I'll write you the code (if you want)

    You could put a 'command button' on your form, that takes all the data, and then by using a docmd, it would append this directly into a table.

    Then you can export, or manipulate this to your hearts content !

    Ken

  6. #6
    Join Date
    Feb 2004
    Location
    Swindon, UK
    Posts
    86
    that would be great Ken,

    The textboxes are: -

    Title
    Initial
    Surname
    Add1
    Add2
    Add3
    Add4
    Pcode

    The Table is tbl-CustomerAddress & the fields the same as the Textboxes

    Cheers
    Last edited by Mowgli212001; 03-26-04 at 12:58.

  7. #7
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Heres a 'simple' database using those fields and names.

    The form is a basic form using Micorsofts own navigation bar and so on.

    I can remove these and place code instead, but if you are trying to learn then this would be a good starting point.

    From here you can see there is no code, and simple links to the table using the control souce under the properties of each field.

    Also within the Table I have set the fields to accept 'zero length' as not everyone is going to have exactly 4 lines for an address code. With out this, you'd get errors.

    Hope this helps you on your way ! If not, come back and post a thread in here somewhere.

    Regards

    Ken
    Attached Files Attached Files

  8. #8
    Join Date
    Feb 2004
    Location
    Swindon, UK
    Posts
    86
    Cheers Ken, but i cannot open the database, it come up with
    'unrecognized database format' any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •