Button to run Query

vidus

Confused User
Local time
Today, 08:14
Joined
Jun 21, 2009
Messages
117
I have a query, let's call it "Query1". I have a split form that I would like to add a button to, that when pressed will run "Query1".

The reason is only because we like to have maximum screen space (we have many columns), so we keep the tables/forms/queries box on the left minimized.

I assume its a quick code to get this to work, but none of my access books mention it.

Thanks!:o
 
The easiest way would be to use the wizzard or run a macro.

In VBA it would be something like this in the click event of your button:

Private Sub YourButton_Click()
DoCmd.OpenQuery "Query1"
End Sub

JR
 

Users who are viewing this thread

Back
Top Bottom