"on open" or "on load"

F

freedomverse

I want to accomplish two things when my form opens:

1. To display a new record
2. To open the form at a specific size

This is my code:

DoCmd.MoveSize 4.75 * 1440, 1.5 * 1440, 6 * 1440, 8 * 1440
DoCmd.GoToRecord , "", acNewRec

Where is the proper/best place to put it? In the "on open" event or the "on
load" event? Is there much/any difference?

Regards,
Jared.
 
L

Linq Adams via AccessMonster.com

I think the

DoCmd.MoveSize 4.75 * 1440, 1.5 * 1440, 6 * 1440, 8 * 1440

can probably be in the OnOpen event, but the

DoCmd.GoToRecord , "", acNewRec

like anything pertaining to data, needs to go in the OnLoad event. I think
you need to drop the "" in the middle argument, so make it simply

DoCmd.GoToRecord , , acNewRec
 

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