Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

"on open" or "on load"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
freedomverse - 28 May 2008 18:53 GMT
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.
Linq Adams - 28 May 2008 19:09 GMT
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

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.