BASIC INSTRUCTION about Open Event

  • Thread starter Ann Scharpf via AccessMonster.com
  • Start date
A

Ann Scharpf via AccessMonster.com

I'm feeling pretty dopey here. I want to open a switchboard form maximized.
I searched for that and found out that in the VBA code page behind the Form's
Open event, I can put the code:

DoCmd.Maximize

This is a much asked question and I am seeing that answer lots of times.
I've only been working on Access for a few months now and I don't know HOW to
get to the VBA code behind the open event. I have searched AccessMonster and
the MS Access help and I am just stuck. Can anyone give me very basic
instructions on how to get to this screen to add the DoCmd.Maximize?

As always, thanks for your help.

Ann Scharpf
 
B

BruceM

Open the form in design view, and click View > Properties. Make sure the
box that appears indicates "Form" in the bar at the very top. Click the
Event tab. Click On Open on the list, then click the three dots that appear
on the right side. Click Code Builder, then OK. A new window should open,
with the following lines of code:

Private Sub Form_Open(Cancel As Integer)

End Sub

Type "DoCmd.Maximize" (without the quotes) between those two lines of code.
Close the code window, save the form, close it, then try opening it in Form
view (that is, just double click it).
 
R

Roger Carlson

There are many ways, but the easiest is to open the form properties and
click the On Open evert. Choose [Event Procedure] in the drop-down list,
then hit the Builder button [. . .] to the right and it will take you to the
VB Editor where you can put the code.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
G

Guest

Hi, Ann.

From form design view, show Properties by selecting View, Properties from
the menu. If the Form's properties are showing, continue, otherwise, click
on the small square at the upper left hand corner of the window to select the
form.

Click on the Event tab, and click the field "On Open". An ellipsis will
appear to the right; click on it, and select Code Builder if necessary
(depending on your configuration, you may be taken directly to the VBA
window). Access will create the first and last lines of the form's On Open
event procedure. Enter the code between the two, save and exit.

Hope that helps.
Sprinks
 
A

Ann Scharpf via AccessMonster.com

Thank you all for offering your help! I had been on this screen but my
window was sized so that I only saw the left pane (with the tree diagram and
table). The code segment of the window was completely hidden. When all
three of you gave the same answer that took me to the window I'd been on, I
started to play with the window and got to the code section. It works just
as I want it now. Thanks so much.

Ann



Roger said:
There are many ways, but the easiest is to open the form properties and
click the On Open evert. Choose [Event Procedure] in the drop-down list,
then hit the Builder button [. . .] to the right and it will take you to the
VB Editor where you can put the code.
I'm feeling pretty dopey here. I want to open a switchboard form maximized.
I searched for that and found out that in the VBA code page behind the Form's
[quoted text clipped - 11 lines]
Ann Scharpf
 

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