From the course: Access: VBA

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Open a table

Open a table

From the course: Access: VBA

Start my 1-month free trial

Open a table

- [Instructor] When you create a database in Access, you will often use a VBA code to automate certain processes. In this case, I might want to allow my users to open the categories table with just a click of a command button. I am working in the Open Categories form and you can see that it has the Open Categories table label and then a command button with categories as its text. The Open Categories form is available to you in the form section of the sample database. If you want to assign a macro to a command button, we need to view the form in Design view. So on the Home tab, I'll click the view button's down arrow, and click Design view. Then, I will right-click the Categories button, and then at the top of the shortcut menu, I'll click Build Event. In the Choose Builder dialog box, I'll click Code Builder, and click OK. And you can see that I have a private subroutine and it's called Command1_CLICK. What that means is that this is the event code that will run when command button…

Contents