automatically running a function after running a query

Excellent1

New Member
Joined
Oct 14, 2002
Messages
41
Is there a way that after I run a Create-table query I can have access automatically run a function I created to run on the created table? Even better How can I link the query and function to a button on a form?

thanks for any input
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Dugantrain

Active Member
Joined
Feb 10, 2003
Messages
354
Drop a command button on your form. Hit Cancel when the Wizard pops up. Double-click the button->Event->On-Click->Code Builder:
Code:
Your_Button_Click()
DoCmd.OpenQuery "Your_Query_Here", acViewNormal
Call Your_Function_Here
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,337
Messages
5,601,026
Members
414,422
Latest member
acegreen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top