Run vba on form opening

D

Duane Hookom

The form has an On Open event. You can access it through the event
properties of the form.
 
J

John Vinson

How do you run code when a form is opened? Can i embed the code in the form?

James

Yes to both. Open the Form in design view, and view its Properties.
Select the Events tab, and click the ... icon by either the Open event
(which fires first, before the Form's recordset has been opened or any
of its controls populated; this event can be calcelled) or its Load
event (fires before the user gets control but after the controls have
been filled).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top