Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Enter Key Behavior

Status
Not open for further replies.

mchambers

MIS
Aug 28, 2008
56
US
Hello,

I have a comment section that on save and close of the entire form adds comments to a history section on my form. I want to be able to hit enter to add to the comment history section without having to save and close. I have a attached a screen shot of what I am trying to do. If you can help me that would be great. Thanks

 
How are ya mmarkes . . .

Try the following in the [blue]On Key Down[/blue] event of the comments control:
Code:
[blue]   If Shift = 0 And KeyCode = 13 Then
      If Me.Dirty Then Me.Dirty = False [green]'save the record[/green]
      Me.Recalc [green]'update calculated fields[/green]
      KeyCode = 0 [green]'return no key to access![/green]
   End If[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Works Perfect!!! Thanks so much! Enjoy the rest of your weekend!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top