Make Your Form Run A Button When You Press Enter!


A common request I get when building search forms or other simple task forms, is to make it so if the user presses Enter, it will make the form run a common task (usually available by clicking a button, like Search, or Print Preview of that fancy report you spent all day building).

The solution at first glance sounds complex…write some code to capture the event key, apply it to the form.  Nahhhh!  That’s for the over thinkers.  Find your button that is the one with the action you want to automate, and on it’s properties set .default to Yes.  That’s it! Now when you are entering in all that data into a search form, just press “Enter” and your data will show!

Related Posts

Access 2016 Relationships

Short blog today, this is a great read on relationships in Access 2016: Access 2016 Relationships Thanks to Microsoft for this one!

Microsoft Access Union Query from Hell. Skill Level: Demi-God

The worst query I ever had to write which powers a master report for the database user.  Here it is.  I don't think I can make it smaller, there were too many weird rules, aggregates, and translations in it.  And we needed to pull different columns based on criteria. ...