Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question

Status
Not open for further replies.

MsPeppa

Programmer
Jun 27, 2001
19
US
Hi I have a quick question for anyone, it's probably an easy one to answer. What code or what not do I have to include in my form so that when a user opens the form all fields will be blank? Right now, if a table contains records and the form which is linked to the table is opened it displays i do believe either the first or the last record. I want the form to open and all fields be blank. I want the user to still be able to scroll through the records using the record scroll at the bottom, but I just want the form to be blank so they can automatically start entering new information instead of having to start a new record. Any tips would be great...thankss
 
Put this line in the on_open or on_load event of your form.

DoCmd.GoToRecord , , A_NEWREC Maq B-)
<insert witty signature here>
 
As far as I understand your question, it appears very simple.
My undestanding is that you want to be able to add records and to browse/modify the existing ones.

Be sure to declare correctly in the parameters of the forms that you allow editing:
AllowEdits YES
AllowAddition YES

Then put in the Form_Load event
either the code: DoCmd.GoToRecord ,,acNewRec
or the equivalent macro containing: GoToRecord New
 
Use the command shown below in the load event for your form.

DoCmd.GoToRecord , &quot;&quot;, acNewRec

B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top