Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115

    I'm sorry, I did not realize that now is not copied the words that appear in the text box "words" in the text box "review track 01"
    In practice, if I type in the box test "words" and hit space, the box "review 01 track remains empty

  2. #17
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm sorry but you lost me again. You have 3 controls on the form you supplied.
    1) a textbox named "IDCD"
    2) a ComboBox named "parole"
    3) a textbox named "Recensione_traccia_01"

    Maybe if you user the control names I would better understand.

  3. #18
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Sorry for the confusion ... I'll explain:
    I type in the ComboBox "words" the word, then press "space" key and this happens:
    [code] = Me.Recensione_traccia_01.Value Me.Recensione_traccia_01 & Me.parole [/ code] then the focus back on the ComboBox "words".
    My problem is that when the focus back on the ComboBox "words", is automatically a space "".
    I would like this space there was

  4. #19
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Make this change to the code:
    Code:
    Private Sub Form_KeyPress(KeyAscii As Integer)
       If Screen.ActiveControl.Name = "parole" Then
          If KeyAscii = 32 Then
             '-- Append the value in the "parole" cbo to the "Recensione_traccia_01" textbox
             Me.Recensione_traccia_01 = Me.Recensione_traccia_01 & Me.parole
             '-- Clear the "parole" cbo for the next selection
             Me.parole = Null
             '-- Eat (destroy) the "space" we just got from the keyboard
    '         KeyAscii = 0
          End If
       End If
    End Sub

  5. #20
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Hello, forgive me if I break ... the code works but if you try to type in the combo "words" the word "test" then press space and type in the word "beautiful", the word beautiful is preceded by a space
    I attach the db
    Thanks

    EmptySpace.zip

  6. #21
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about now?
    Attached Files Attached Files

  7. #22
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    No, unfortunately, does not go ... in practice I type on the combo "words" test, then press "space" and copy me "test" in the combo "recensione_traccia_01", then the focus returns to the "words" and appears a space.
    Do you carry a sequence to explain better
    combo "words" -> I type test
    I press space
    "test" is copied to the combo "recensione_traccia_01"
    the focus back on the combo "words"
    I type test and is not completed because the word before the cursor flashing has formed a "space" (" ")
    I'm sorry .. I know I'm driving you crazy with my problem of access

  8. #23
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Part of the issue is your names for things:
    Quote Originally Posted by sergran View Post
    No, unfortunately, does not go ... in practice I type on the combo "words" test, then press "space" and copy me "test" in the combo "recensione_traccia_01", then the focus returns to the "words" and appears a space.
    Do you carry a sequence to explain better
    combo "words" -> I type test
    There is NO combo control named "words".
    I press space
    "test" is copied to the combo "recensione_traccia_01"
    The "recensione_traccia_01" control is NOT a combo. It is a Textbox.
    the focus back on the combo "words"
    I type test and is not completed because the word before the cursor flashing has formed a "space" (" ")
    I'm sorry .. I know I'm driving you crazy with my problem of access

  9. #24
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    I'm sorry....
    There is NO combo control named "words". ---> "parole"

  10. #25
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    For some reason it is not easy for me to figure out what you want so here's another guess. It seems you are not very comfortable with VBA.
    Attached Files Attached Files

  11. #26
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    You're right ... is difficult for me to explain ...
    I am attaching the screen-shot
    1 -> I write the word (work)
    2 -> I press space and the word "Beautiful" is inserted in the textbox "Recensione_traccia_01" (works)
    3 -> the tab back on the combobox "parole" and remains one space to the left of the blinking cursor. I wish that space was canceled. Maybe I could use Ltrim? But how? I could not

    Thanks very much
    Attached Files Attached Files

  12. #27
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I thought in Post #18 you said you *wanted* the space so we put it back in. Where do you want the space to go?

  13. #28
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    BTW, there is nothing in your screen-shot.zip file.

  14. #29
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Screen-shot1.zip excuse Hello

  15. #30
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Now show the sequence for the *next* word typed please. Does this do as you want?
    Attached Files Attached Files

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-03-2013, 10:38 AM
  2. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  3. Replies: 2
    Last Post: 08-16-2012, 10:02 PM
  4. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  5. Replies: 5
    Last Post: 01-02-2011, 10:09 AM

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